Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
DewayneH
1012 Views, 6 Replies

BOM Structure - Component Pattern Elements

I need to set the BOMStructure of all the elements of a component pattern to reference or default depending on a parameter. 

Initially, I thought it would be as easy as setting the BOMStructure for the pattern:

 

If Parameter("Belt", "BucketRowQ") = 1 Then
Component.InventorComponent("Double-Buckets and Hardware").BOMStructure = BOMStructureEnum.kReferenceBOMStructure

Apparently that does nothing.

Based on my digging, it looks like I have to deal with each element individually.

The quantities are changing so I need to be able to affect all the elements in the pattern regardless of the quantity.

 

Basically if the parameter = 1, the BOMStructure of all elements will be reference.

If it = 2 they they will be set to default.

 

I have found some examples dealing with pattern visibility and BOM structure, but not exactly what I need.

I've tried patching some code together but I'm far from experienced. Can't find solutions, but I can find errors.

 

Thanks in advance.

 

 

Dewayne
Inventor Pro 2023
Vault Pro 2023