For performance reasons Inventor works by default with First level BOM visualization.
It is not very obvious to users on how they can display and export the full (all level) BOM both from the assembly and from the drawing environment.
This article tries to give a step by step explanation in an attempt to demystify BOM expansion.
Step1: Enable BOM view
By default the Inventor BOM does not show any content neither in the "Structured" nor the "Parts only" tab.
To turn on the display of these tabs, you will have to "Enable BOM view" in both tabs.
Although the BOM now gets populated, both the First level and the Parts only view have their drawbacks.
The First level gives the right structure (up to one level for the moment) but has no automatic expansion.
The Parts only view shows all parts without any structure.
Step 2: Turn on All levels in the Structured tab
If you would attempt an export from the assembly BOM using these default settings, you would only get a first level export.
As you can see from the picture below, the "Export all levels" option is not even selectable at this point.
The same problem exists when you place the assembly in a drawing and try to create an all-level parts list.
The "All levels" option is not even selectable once a view has been chosen.
To get the fully expanded BOM, you need to go to the Structured view tab in the assembly, select View Properties... and then select "All levels" and choose your preferred delimiter.
Step 3: Save your assembly
When you save the assembly, the export all levels option will be automatically selected going forward.
This means that once you have made above selections, you will never have to select these again for this assembly as your settings get stored in the assembly document.
Remember that the settings in the assembly BOM AUTOMATICALLY determine the parts list behavior in the drawing!
An All level BOM in the assembly will result in an All level parts list in the drawing.
Step 4: Export your BOM
My preference is to do this from the assembly BOM and not from the drawing parts list.
The reason is that the drawing parts list export does not have automatic level expansion (contrary to the BOM export in the assembly).
The fully structured BOM view can be exported to various formats (use CSV to see in Excel).
Result of a CSV as seen in Excel (the indentation in the first column was manually added for clarity):
Click on below image to watch a 2 minute video showing the different steps.



Subscribe
hi,
how can i export bom to specific worksheet in excel by vba? thanks.
Posted by: sky | 11/17/2011 at 06:30 PM
Hi sky,
For a deeper understanding on how to use VBA to export a BOM to Excel, see my otehr post here:
http://beinginventive.typepad.com/being-inventive/2011/11/export-parts-list-to-excel-in-vba.html
Thanks for your interest in this topic.
Bob
Posted by: Bob Van der Donck | 11/21/2011 at 05:19 PM
Hi there,
Is there anyway of exporting a BOM with All Levels in an iassembly containing isub assemblies?
Cheers,
Niall
Posted by: Niall | 04/26/2012 at 10:14 PM
I did not realize that iAssemblies cannot be expanded in the BOM. Thsnks for pointing that out.But via the API you can work around it.
Here is a VBA macro that will create a spreadsheet called BOM.XLS in your workspace. It will contain an all level BOM even for iAssemblies or iAssemblies that contain isubassemblies.Thanks.Bob
Public Sub BOMAllLevelExport()
' Set a reference to the assembly document.
' This assumes an assembly document is active.
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
' Set a reference to the BOM
Dim oBOM As BOM
Set oBOM = oDoc.ComponentDefinition.BOM
' Set the structured view to 'all levels'
oBOM.StructuredViewFirstLevelOnly = False
' Make sure that the structured view is enabled.
oBOM.StructuredViewEnabled = True
' Set a reference to the "Structured" BOMView
Dim oStructuredBOMView As BOMView
Set oStructuredBOMView = oBOM.BOMViews.Item("Structured")
' Export the BOM view to an Excel file
oStructuredBOMView.Export ThisApplication.FileLocations.Workspace + "\BOM.xls", kMicrosoftExcelFormat
End Sub
Posted by: Bob Van der Donck | 04/27/2012 at 03:09 PM