System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingF

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingF

bhavik4244
Collaborator Collaborator
2,184 Views
2 Replies
Message 1 of 3

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingF

bhavik4244
Collaborator
Collaborator

Hi there,

 

I'm working on huge assembly which has around 500+ components and lots of subassemblies. Some rule are executed from main assembly and give the below error. When I run the same rule in particular assembly then it's running fine.

 

Error:

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.ComponentOccurrence.set_BOMStructure(BOMStructureEnum )
at iLogic.ComponentInRule.SetActiveState(ComponentOccurrence compo, Boolean valb, Boolean onlyBOMStructure)
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

What could cause this error?


Bhavik Suthar
0 Likes
2,185 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor

It's a bit hard to say what the problem is exactly but what i understand from the stack trace is this: It seems like you are trying to set the bom structure of an occurrence. if you do this manually it would look like this.

JelteDeJong_0-1631867242840.png

As you can see there are not that many options. (No purchase or inseparable in this example) Are you sure that you are not trying to set something that is also manual not possible?

 

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

bhavik4244
Collaborator
Collaborator

@JelteDeJong 

 

I have nothing related to BoM in the rule.

 

I have a line of code for content center replace, would it make any issue?

 

Dim replacer As New ContentCenterReplace(ThisDoc.Document, ThisApplication, "en-US")

 


Bhavik Suthar
0 Likes