Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
2034 Views, 6 Replies

Accessing component definition of Weldment

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?