Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
As title mentions, I get the following error when changing BOM structure to Phantom.
Referenced and Default(Normal) works just fine.
Can anybody help me?
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.ComponentOccurrence.set_BOMStructure(BOMStructureEnum )
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
oCompDef = ThisDoc.Document.ComponentDefinition
Dim CheckValue1 As String = "MC-"
For Each oOcc As ComponentOccurrence In oCompDef.Occurrences
If oOcc.Visible = True And Not oOcc.Name.Contains(CheckValue1) Then
oOcc.BOMStructure = BOMStructureEnum.kDefaultBOMStructure
ElseIf oOcc.Visible = True AndAlso oOcc.Name.Contains(CheckValue1) Then
oOcc.BOMStructure = BOMStructureEnum.kPhantomBOMStructure
Else
oOcc.BOMStructure = BOMStructureEnum.kReferenceBOMStructure
End If
Next
iLogicVb.UpdateWhenDone = True
InventorVb.DocumentUpdate()
RuleParametersOutput()
ThisDoc.Document.Rebuild2
Solved! Go to Solution.