Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detect a derived document?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
379 Views, 5 Replies

Detect a derived document?

Is there a simple property or method to detect a derived file.  I do not see anything in the API with that name.

 

Thanks in advance.

5 REPLIES 5
Message 2 of 6
humbertogo
in reply to: Anonymous

use DerivedPartComponents

The DerivedPartComponents collection object provides access to all of the existing objects in a part and provides methods to create additional derived components

Message 3 of 6
Anonymous
in reply to: humbertogo

The problem is I am iterating through occurrences to determine which are suppressed. Does this mean my only recourse is to check every occurrence document against the every entry in the derivedpartcomponents collection?
Message 4 of 6
Vladimir.Ananyev
in reply to: Anonymous

I believe the following properties could help you.

 

ComponentOccurrence.Suppressed property returns whether this occurrence is suppressed or not.

 

ComponentOccurrences.AllLeafOccurrences property returns all unique leaf occurrences (optionally filtered to the specified definition) relative to this context. 

ComponentOccurrences.AllReferencedOccurrences property returns all occurrences that reference the input object.

 

Document.ReferencedDocuments property returns all the documents directly referenced by this document. 

Document.AllReferencedDocuments property returns all the document references of this Document along with all of the recursively nested references.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 6
Anonymous
in reply to: Vladimir.Ananyev

I have used and know how to use those objects.  That was not my question.

 

Is looping through the DerivedPartsCollection the only way to detect if a part is derived?

 

Seems really unwieldy if ths is so as I alread have the part document in hand from the assembly part occurance.

Message 6 of 6
Vladimir.Ananyev
in reply to: Anonymous

Yes, looping through the DerivedPartsCollection is the only reliable way to detect if a given part is derived by the current document or not.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report