BOM StructuredViewFirstLevelOnly = False ArgumentException

BOM StructuredViewFirstLevelOnly = False ArgumentException

herrwolf1
Enthusiast Enthusiast
529 Views
1 Reply
Message 1 of 2

BOM StructuredViewFirstLevelOnly = False ArgumentException

herrwolf1
Enthusiast
Enthusiast

Hello,

I'm trying to set the BOM Structured options. I get the following error when I try to change the StructuredViewFirstLevelOnly property from both the assembly and drawing environments. All this code came from the help files. Any suggestions?

 

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

 

Code from the drawing environment.

 

        ' Set a reference to the referenced model document
        Dim oModelDoc As Document
        oModelDoc = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument

        ' First check if the 'structured' BOM view has been enabled in the model
        ' Set a reference to the model's BOM object
        Dim oBOM As BOM
        oBOM = oModelDoc.ComponentDefinition.BOM

        oBOM.StructuredViewFirstLevelOnly = False ' This Line Crashes.
        oBOM.StructuredViewEnabled = True

 

 

0 Likes
530 Views
1 Reply
Reply (1)
Message 2 of 2

Jef_E
Collaborator
Collaborator

I am encountering the same error.. any Ideas?



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes