- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am wanting to use ilogic to change the BOM structure of parts in an assembly, depending on their level of suppressed or active. I am using this to drive my BOM to have only the active parts in it. We export directly from Inventor's BOM to our inventory control system.
The current code I have been using has been working however it will only change the value once. If the BOM structure is Normal, it can convert it to Phantom but not back. However if it is currently Phantom it can then change it to Normal. I had an Else If statement after this to change the Bom Structure back if the part was active.
Here is the code I have been using and have gotten most of it from these forums.
I am no where near the pro level you guys are with this so a coding for dummies level of guidance would be appreciated. Thanks!
SyntaxEditor Code Snippet
If Component.IsActive("HANDRAIL A:1") = False Then Dim oOcc As ComponentOccurrence = Component.InventorComponent("HANDRAIL A:1") oOcc.Definition.BOMStructure = BOMStructureEnum.kPhantomBOMStructure End If
Solved! Go to Solution.