Message 1 of 4
Modify Bom Table Settings (add Custom iProperty Column)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Recently, I was asked to automate customization of BOM Table settings (add column of a custom iProperty)
I don't see any easy way thus the plan is to export current settings to XML file, modify the file in a necessary way, import settings back from the modified XML file.
I manually exported xml twice (before and after adding the column). The files differ quite a lot.
1. Thus my first question is - if there any description of that XML?
2. I also get Exception 80004005 when I try to export settings with API
If Not TypeOf ThisDoc.Document Is AssemblyDocument Then MsgBox("Not Assy!") : Return
Dim aDoc As AssemblyDocument = ThisDoc.Document
Dim aDef As AssemblyComponentDefinition = aDoc.ComponentDefinition
Dim aBom As BOM = aDef.BOM
Logger.Info("aBom: " & If(aBom Is Nothing, "-", "+"))
Logger.Info("BOMViews Count: " & aBom.BOMViews.Count)
Dim aBomCstSetFilePath As String = "C:\Temp\BomCstSets.xml" ' aDoc.FullFilename & "_BomCstSets.xml" ' System.IO.Path.ChangeExtension(aDoc.FullFilename, "xml")
Logger.Info("aBomCstSetFilePath: " & aBomCstSetFilePath)
aBom.ExportBOMCustomization(aBomCstSetFilePath) ' Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
Dear@MjDeck, can you, please, study #2 ?
Please vote for Inventor-Idea Text Search within Option Names