Detect a derived document?

Detect a derived document?

Anonymous
Not applicable
569 Views
5 Replies
Message 1 of 6

Detect a derived document?

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
570 Views
5 Replies
Replies (5)
Message 2 of 6

humbertogo
Advocate
Advocate

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

0 Likes
Message 3 of 6

Anonymous
Not applicable
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?
0 Likes
Message 4 of 6

Vladimir.Ananyev
Alumni
Alumni

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

0 Likes
Message 5 of 6

Anonymous
Not applicable

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.

0 Likes
Message 6 of 6

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

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

0 Likes