Message 1 of 7
Accessing component definition of Weldment

Not applicable
07-26-2017
06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am running a for loop through AllReferencedDocuments in an assembly. Trying to access the component definition of any weldment assemblies using this line:
Dim wcd As WeldmentComponentDefinition = oRefDoc.ComponentDefinition
But I receive an error saying this:
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
I can write a rule inside the weldment assembly and access it from there:
Dim oAssDoc As AssemblyDocument
oAssDoc = ThisApplication.ActiveDocument
Dim wcd As WeldmentComponentDefinition
wcd = oAssDoc.ComponentDefinition
But I need to access the component definition of any weldment assemblies from my top level rule, how do I do it?