Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic to make a parts BOM structure to Phantom from an assembly rule

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
gazadder
1157 Views, 5 Replies

Ilogic to make a parts BOM structure to Phantom from an assembly rule

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

 

5 REPLIES 5
Message 2 of 6
Vladimir.Ananyev
in reply to: gazadder

You may change the Bom Structure to Phantom via BOMRow.BOMStructure property.

Could you please look at the following thread?

http://forums.autodesk.com/t5/inventor-customization/bom-structure-fromnormal-to-phantom/m-p/3604844...


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
gazadder
in reply to: Vladimir.Ananyev

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?

Message 4 of 6
Vladimir.Ananyev
in reply to: gazadder

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,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 6
gazadder
in reply to: Vladimir.Ananyev

Many thanks for this Vladimir.
Message 6 of 6
Vladimir.Ananyev
in reply to: gazadder

Happy coding!  Smiley Happy


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report