Does anyone know if it is possible to run the 'import .xml structure' routine for an assembly BOM using either iLogic or VB?? I'm trying to replicate the Import button at the bottom of the BOM screen.....
I've been trawling for days with no success.
Any help would be much appreciated!
I do not see any Import method for the BOM or BOMView objects in the API. There is of course an Export method.
Help me out here.
Why would one want to import BOM items into an Assembly?
If we are talking components that are not modeled wouldn't you want to add them to the assembly as virtual components so that everything flows in the right direction?
Thanks for the reply!
I am trying to import the structure of the BOM, not the content.
I can add custom iProperties through VB, but for these to appear in the BOM, i need to add the relevant columns to the BOM view. I can do this via an .xml file, using this import button. It is this function i need to automate. Otherwise, every time i want to add a new iProperty, i would have to open every assembly and run this import.........
Any ideas???
Thanks for the input mate, it's just frustrating to see a button that I can't click in code when required......
Cheers anyway!
Has anyone found a way to do this yet that they would like to share? It would be nice but i assuming since its still not in the object browser for the BOMView class in 2012 it still cant be done.
For reference here are other threads.
This is now possible. Im not sure in which version it was added, but this method works in 2018.
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
Also this works great with the new trigger options they just recently added.