API for import/export BOM customization

API for import/export BOM customization

Anonymous
Not applicable
1,359 Views
1 Reply
Message 1 of 2

API for import/export BOM customization

Anonymous
Not applicable

We often change the BOM style for different product. so we consolidate all style XML files to a single folder, and want to build a Button to import directly form the fold contain those XML files.

 

Does Inventor provide API for those two functions?

 

See the pictures form the link.

 

thanks!

 

Rick

0 Likes
1,360 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I know very old thread. But this is now possible:

 

Public Sub BOMCustomizationImport()
    ' 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
     
    Dim oPath As String
    oPath = "C:\import\Test.xml"
     
    oBOM.ImportBOMCustomization (oPath)

End Sub