Skip to main content
Known Participant
May 22, 2019
Answered

Finding graphics folder for a book

  • May 22, 2019
  • 1 reply
  • 412 views

Hello,

I need to find the folder where the graphic files are stored for a certain book.

For example, the book location is: \pathToBook\myBook.book and imported graphic files reside in the "Images" folder as in: \pathToBook\Images\.

I need to work on legacy books where this folder can be either "Images", "Illustrations", "Resources", "References", "XX", etc.

I'm thinking on parsing each component on the book and look for oGraphic.InsetFile for each imported and look for commonalities.

Do you think this is a good approach?

Is there a way to create an LOR for "Imported Graphics" with code? And, read the path to the file from there...

Thanks in advance!

This topic has been closed for replies.
Correct answer frameexpert

I would probably loop through all of the files in the book, and check the path on each Inset. You could compile an array of unique paths and then print that array to the Console.

1 reply

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
May 22, 2019

I would probably loop through all of the files in the book, and check the path on each Inset. You could compile an array of unique paths and then print that array to the Console.

www.frameexpert.com