BoM configuration

BoM configuration

TONELLAL
Collaborator Collaborator
689 Views
2 Replies
Message 1 of 3

BoM configuration

TONELLAL
Collaborator
Collaborator

Hello,

I need several BoM styles, so I've created several config XML files. For each style I have to Open BoM, clic on Import, then select the right xml file. It could be easier if I could create a macro "Open BoM with xxx.xml config file".

In a precedent version (I think 2010 or 2012), there was a "limitation" in the API, it was impossible to "Open BoM with options" or define BoM configuration (properties, ...) from a macro. Is it possible now ?

0 Likes
Accepted solutions (1)
690 Views
2 Replies
Replies (2)
Message 2 of 3

frederic.vandenplas
Collaborator
Collaborator
Accepted solution

Hi,

 

This is written in .NET and imports a XML file

 

Private Sub m_AmgBomImport_OnExecute(Context As NameValueMap) Handles m_AmgBomImport.OnExecute
Dim oAsmDoc As AssemblyDocument = InvApp.ActiveDocument
oAsmDoc.ComponentDefinition.BOM.ImportBOMCustomization("O:\~soft\autodesk customisatie\ribboninventor\AmgBomImport2015.xml")
End Sub

If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
Message 3 of 3

TONELLAL
Collaborator
Collaborator

Thanks, it's exactly what I was looking for : oAsmDoc.ComponentDefinition.BOM.ImportBOMCustomiza​tion(xml_config_file) and oAsmDoc.ComponentDefinition.BOM.ExportBOMCustomiza​tion (xml_config_file).

 

0 Likes