09-13-2016
09:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-13-2016
09:58 AM
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!