Not applicable
08-08-2016
01:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I thought this one would be easy but is causing me some trouble. I have several BOM configurations that I need to export out of inventor. Right now I import the xml. file to get the configuration I want then check it before exporting the file. Is there a way to import the xml. file using iLogic?
My plan is to have the different BOM configurations set up as external rules and using a global form I can click on whatever BOM configurations I need to use. This way I just open the BOM and it’s ready to view or export.
I tried to change some code I found on here but just not getting me anywhere (code below). I would appreciate any help you might be able to give.
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
thanks
JD
Solved! Go to Solution.