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.
Solved! Go to Solution.
Solved by Vladimir.Ananyev. Go to Solution.
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
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.
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.
Yes, looping through the DerivedPartsCollection is the only reliable way to detect if a given part is derived by the current document or not.