How can I get the FileDescriptor from ActiveDocument?

How can I get the FileDescriptor from ActiveDocument?

Anonymous
Not applicable
406 Views
3 Replies
Message 1 of 4

How can I get the FileDescriptor from ActiveDocument?

Anonymous
Not applicable

It seems I can only get the File object, can I cast it somehow?

0 Likes
407 Views
3 Replies
Replies (3)
Message 2 of 4

xiaoyan.qi
Alumni
Alumni

What's the meaning of "FileDescriptor"?  does it means file properties?

if so, you can try to get it from ActiveDocument.PropertySets

for example, the Titile of the file is : ActiveDocument.PropertySets.item(1).item(1)

 

Thanks

Mick

0 Likes
Message 3 of 4

Anonymous
Not applicable

According to the programming help "

The FileDescriptor object represents a reference to an Autodesk Inventor file or a foreign file."

 

I am writing an app that parses the document tree for the active document i.e. looping through all referencedfiledescriptors for all children recurisively. I would like to get hold of the filedescriptor for the root node to be able to use the same wrapper class for the active document and all its children. I tried your suggestion but did not find a filedescriptor in the propertysets properties.

0 Likes
Message 4 of 4

MjDeck
Autodesk
Autodesk

I don't think you can get a FileDescriptor for the top-level document.  The FileDescriptor is used for referenced files.  The top-level document is the root, and no other document references it.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes