Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am running the code below:
Dim oAssDoc As AssemblyDocument oAssDoc = ThisApplication.ActiveDocument oAssDoc.Save Dim oBOM As BOM oBOM = oAssDoc.ComponentDefinition.BOM MessageBox.Show("FLO " & oBOM.StructuredViewFirstLevelOnly) MessageBox.Show("Str " & oBOM.StructuredViewEnabled ) 'oBOM.StructuredViewFirstLevelOnly = False oBOM.StructuredViewEnabled = True Dim oBVList As New ArrayList For Each item As BOMView In oBOM.BOMViews oBVList.Add(item.Name) MessageBox.Show(item.Name) Next Dim BOM As Inventor.BOMView BOM = oBOM.BOMViews.Item("Unbenannt")
The values I am reading in the MsgBoxes are FLO False and Str True. The reason why "'oBOM.StructuredViewFirstLevelOnly = False" is commented out is because I get an error as soon as I dont ("Wrong parameter"). As shown above the code runs fine but the only BOMView in oBOMViews is "Unbenannt" (unnamed). I would however need "Strukturiert" (structured). I did run the code in other assemblies and there is works fine and I do have a structured view. Hence there must be something wrong with the assembly doc settings?? Any idea?
Thanks
Jonas
Solved! Go to Solution.