Is it possible to change a parts BOM structure using Ilogic from Normal to Phantom from an assembly rule? I can change a parts BOM Structure to Reference however the problem is the part I require is within a pattern and changing the BOM structure is just changing 1 occurance of the pattern so if there are 12 occurances then only 1 of them is changing to Reference.
The below code is what I am using that doesn't quite do what I want.
oCompOcc = Component.InventorComponent("INNER_STIFFENING_RING_1") oCompOcc.BOMStructure = BOMStructureEnum.kReferenceBOMStructure
Solved! Go to Solution.
Solved by Vladimir.Ananyev. Go to Solution.
You may change the Bom Structure to Phantom via BOMRow.BOMStructure property.
Could you please look at the following thread?
Thansk Vladimir
I have seen this thread before but my skill level doesn't let me modify it to be specific to a particular part from within an assembly?
The following method should work:
'get the reference to the component by its name Dim oOcc As ComponentOccurrence = Component.InventorComponent("INNER_STIFFENING_RING_1") ' set BOM structure to Phantom oOcc.Definition.BOMStructure = BOMStructureEnum.kPhantomBOMStructure
'oOcc.Definition.BOMStructure = BOMStructureEnum.kNormalBOMStructure 'oOcc.Definition.BOMStructure = BOMStructureEnum.kPurchasedBOMStructure 'oOcc.Definition.BOMStructure = BOMStructureEnum.kInseparableBOMStructure
Cheers,
Happy coding!