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

iLogic driven BOM

Formsprag
Advocate

iLogic driven BOM

Formsprag
Advocate
Advocate

Looking a little help with a BOM problem. I have a iLogic driven configurator that simply switches between view reps to build each configuration. Model works beautifully except the BOM shows everything in the Master. What is the most efficient way to get the BOM to only display visible components for the Active view rep?

 

I've seen older posts about creating a custom LoD named "iLogic" and I've seen posts stating to stay away from LoDs.

 

I simply do not want non-visible components to show up in the BOM each time the configurator is run.

 

Thanks

Inventor 2020

0 Likes
Reply
426 Views
6 Replies
Replies (6)

marcin_otręba
Advisor
Advisor

Hi,

 

If something should not be visible in BOM window in assembly enviroment then its BOM structure should be set to be reference but it will affect only 2 views : structured and parts only. It can be set inside each assembly to do not affect document definition, so in one assembly it will be reference and in another default.

 

Ity can be done thru occurrence:

 

Dim occ As ComponentOccurrence
For Each occ In ThisDoc.Document.componentdefinition.occurrences
occ.BOMStructure = kReferenceBOMStructure
next

 

Formsprag
Advocate
Advocate

OK, can this rule be made to only change non-visible components to reference? It would need to be able to switch components between "Normal" and "Reference" based on the visibility of each component in the view rep.

0 Likes

marcin_otręba
Advisor
Advisor

try:

Dim occ As ComponentOccurrence 
For Each occ In ThisDoc.Document.componentdefinition.occurrences
if occ.visible=true then occ.BOMStructure = kReferenceBOMStructure
end if 
next

Formsprag
Advocate
Advocate

Thank you for your help, here's what I ended up with for the .iam

Any idea how to make this work for an .idw?

 

'Set Bill of Material Structure
Dim occ As ComponentOccurrence
For Each occ In ThisDoc.Document.componentdefinition.occurrences
	
	If occ.Visible = True Then
	occ.BOMStructure = kDefaultBOMStructure
	
	Else If occ.Visible = False Then
	occ.BOMStructure = kReferenceBOMStructure

End If

Next

 

0 Likes

marcin_otręba
Advisor
Advisor

you want to make this in drawing partslist ? or you want to get acces to assembly bom from drawing?

0 Likes

bradeneuropeArthur
Mentor
Mentor

Hi,

 

In the drawing you can use the "Filter" function to do this.

With the filter you can filter based on View Representation and visibility and other methods.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes