Guys I need some help
I wrote a ilogic rule that extracts some information from the referenced document in a drawing.
It has been working great until today! This is the part of the code that is complaining
' iterate through referenced documents, in reality there is only one
For Each
oRefDoc In oDrawingDoc.AllReferencedDocuments
oPropsets = oRefDoc.PropertySets
oParameters =oRefDoc.ComponentDefinition.Parameters
oUserParams =oRefDoc.ComponentDefinition.Parameters.UserParameters
next
I think I know what the problem is but need some help to fix this.
Sometimes i have a part to which i have 1 or 2 parts linked. In this case the code throws me out.
I think this is because Inventor is seeing these linked parts as being referenced documents. So it getting confused.
Anyone help me out to change this so the code ignores the linked files
If you don't like to access the indirectly referenced documents by the drawing document you can use the ReferencedDocument instead of the AllReferencedDocuments. Hope this helps.