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

Export Assembly BOM with Parent Part numbers

Anonymous

Export Assembly BOM with Parent Part numbers

Anonymous
Not applicable

Hello,

I have a need to use my BOM in another program that has the ability to import complex assemblies in one import.

It uses a "parent part number" field to identify the assemblies.

Anyone have any ideas? I manually added a field and populated it to give you an idea of what I'm looking for.

I left in the "Item" column for a clear picture of the hierarchy, but that isn't necessary for my import.

Part Number, Parent Part Number, Quantity, Unit Quantity

are my minimum fields. 

 

Parent Part Number.png

0 Likes
Reply
772 Views
8 Replies
Replies (8)

bradeneuropeArthur
Mentor
Mentor

Hi,

 

What is the file format you are needing for the export.

 

Question:

 

What are you trying to do with this exported BOM.

Maybe there are less complex methods to achieve the same as you are needing!

 

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

Anonymous
Not applicable

The preferred format is .csv

 

I am importing into an ERP system that creates routers and work orders. It requires a specific import template as I listed.

 

I can import each assembly one by one - but if I can figure this out (with the parent part numbers) then I can do it in one import.

0 Likes

bradeneuropeArthur
Mentor
Mentor

What if the Childfile is used in more than one parent?

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

Anonymous
Not applicable

I am using a "Structured" list with expanded assemblies to give me the following - notice the item numbers that Inventor populated (4.1 is a child of 4): parts are repeated if they are in multiple assemblies.

 

Parent Part Number 2.png

0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

Try the following suggestion to customize BOM.

 

https://www.cadlinecommunity.co.uk/hc/en-us/articles/203364071-Inventor-2017-Quick-Tip-BoM-Customisation-

 

To import customized BOM, try the following VBA code to import.

 

 

Sub BOM_ColumnCustomizasion_Export ()
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument
Dim oAsmDef As AssemblyComponentDefinition
Set oAsmDef = oAsmDoc.ComponentDefinition
Dim oBOM As BOM
Set oBOM = oAsmDef.BOM
Dim filename As String
filename = "c:\temp\BOM_Columns.xml"
Call oBOM.ExportBOMCustomization(filename)
Beep
End Sub
Sub BOM_ColumnCustomizasion_Import ()
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument
Dim oAsmDef As AssemblyComponentDefinition
Set oAsmDef = oAsmDoc.ComponentDefinition
Dim oBOM As BOM
Set oBOM = oAsmDef.BOM
Dim filename As String 'assume the file exists
filename = "c:\temp\BOM_Columns.xml"
Call oBOM.ImportBOMCustomization(filename)
Beep
End Sub

After importing BOM, try to export BOM using following VBA code.

 

Public Sub BOMExport()
    ' 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 "C:\temp\BOM-StructuredAllLevels.xls", kMicrosoftExcelFormat

End Sub

Hope, this would help you to import assembly with Parent Part Number.

 

Thanks and regards,

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Anonymous
Not applicable

Thanks Chandra, this looks very promising. I will dig into it and see what I come up with.

0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous - let me know if any assistance required.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

Brett.G
Enthusiast
Enthusiast

Nick,  were you ever able to figure out a solution?  This functionality is something I'd be interested in as well.  Thanks!

0 Likes

Type a product name