Get iProperties from File Path Alone, Without having to Open the File - iLogic

C_Haines_ENG
Collaborator
Collaborator

Get iProperties from File Path Alone, Without having to Open the File - iLogic

C_Haines_ENG
Collaborator
Collaborator

This seems impossible as nobody has ever asked this question it seems, but is there a way to get the description or part number from a part file based entirely on having the file path? All other solutions seem to make you open the document. I also need to write to this value so read only properties wont work.

 

For Each oFile In System.IO.Directory.GetFiles("FILEPATH", "*.ipt", IO.SearchOption.AllDirectories)

		MsgBox(iProperties.Value(oFile, "Project", "Description"))

Next

 Please help.

0 Likes
Reply
124 Views
1 Reply
Reply (1)

WCrihfield
Mentor
Mentor

Hi @C_Haines_ENG.  The simple fact is that the iProperties are stored in the 'Document', which is different from the 'File'.  The Document exists in Inventor's memory, from loading the file's data into it.  So opening the document, even if not opening visibly, is always required.  However, I have heard that we can use Apprentice from a standalone EXE type application to access iProperties faster.  There is a Document.FilePropertySets property that is supposedly what is accessed by a 'Shell extension', which is likely what is used by an external helper from the Windows file explorer screen.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)