Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: iogurt1

Since the BOMStructureEnum can only be used within an assembly you could place a rule in the assembly that look like this:

 

SyntaxEditor Code Snippet

sArg1 = RuleArguments("Item Name")

If sArg1 <> " " And sArg1 <> "" Then

    If Component.InventorComponent(sArg1).BOMStructure = BOMStructureEnum.kReferenceBOMStructure Then
        SharedVariable("BOM Structure") = "Reference"
        MsgBox("Reference")
    Else MsgBox("Normal")
        SharedVariable("BOM Structure") = "Normal"
    End If

End If

 

Then place a rule in the dwg that looks like this:

 

SyntaxEditor Code Snippet

Dim map As Inventor.NameValueMap 
map = ThisApplication.TransientObjects.CreateNameValueMap()
map.Add("Item Name", "Inlet Section")

iLogicVb.RunRule("Meter Assembly.iam", "Rule10", map)


AssyBOMStruct = SharedVariable("BOM Structure")

If AssyBOMStruct = "Normal" Then
    MsgBox("Run This Stuff")
End If

 

Just change the variable names to fit your application and it should work!