Inventor 2022 Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

Inventor 2022 Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

Pav3L
Advocate Advocate
836 Views
4 Replies
Message 1 of 5

Inventor 2022 Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

Pav3L
Advocate
Advocate

Hi,

we are getting this error on any assembly on two different computers when certain conditions are met. I have attached simple example assembly with the error easily reproducible.

 

The error is:

Error on line 1 in rule: TEST RULE, in document: Assembly.iam

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

EDIT 2: Error More info tab:

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.Parameter.set_Expression(String )
at iLogic.ParamDynamicFinder.SetParamValue(Parameter param, Object value, Boolean doUpdate)
at ThisRule.Main() in rule: TEST RULE, in document Assembly.iam:line 1
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

iLogic Rule:

 

Parameter("Pin:1", "PIN_DIAMETER") = Pin_Diameter

Parameter("Sub_Assembly", "Plate_Distance") = Plate_Distance

iLogicVb.UpdateWhenDone = True

 

 

Below is screencast of the error when it appears. The only fix how to get rid of the error is to close the Inventor and open it again, this is also shown in the video, but this is not a solution. The error will appear again.

 
EDIT: for some reason I cannot insert the screencast into the post so here is a link https://autode.sk/3MNZu5l 
 
Explanation of the video in writing:
1. Time 0:00 to 0:20 - The Assembly works ok without error when you open it. The iLogic rule works fine, I can change the Pin_Diameter  parameter in the Assembly and it will change the PIN_DIAMETER in the Pin part or change the Plate distances.
2. Time 0:21 to 1:08 - If you open the Pin in the Assembly window by doubleclick on the Pin part and change a parameter in the Pin, in the video PIN_Length and go back to the Assembly, the iLogic rule still works ok and Pin diameter is changing.
3. Time 1:10 to 2:00  - The ERROR will appear after doing the following. Open the Pin part in a new separate window, change PIN_Length parameter. Go back to the Assembly and try to change the Pin_Diameter parameter so the iLogic rule is forced to run and the error will appear.
4. Time 2:01 to 2:35 - Inventor is closed and opened again.
5. Time 2:36 to 3:20 - A repeat of step 2. Showing that the rule works fine again when the part is opened directly in the Assembly window and parameter is changed in the part.
6. Time 3:21 to 3:xx - A repeat of step 3. The error appears again, when the part is opened in separate window and parameter is changed in the part.
 
 
Because of this error we are wasting a lot of time when we are working on our assemblies, because to get rid of the error we have to close Inventor and open it again.
All it takes is to open a part in separate window, which is unavoidable at some point and change some parameter in the part. Then in the main assembly where we have rules that control the parts, these rules stop working and show the Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) .
 
I know that in Inventor 2020, this problem was not present. It appeared when we migrated to 2022.
 
I do not know if anybody on the forum will be able to help us. If not are Autodesk developers reading this forum or how I can report this issue directly to Autodesk?
 
Thank you
0 Likes
837 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @Pav3L.  Just dropping a couple of quick ideas here, to see if either may help.  Have you tried clicking on the 'Rebuild All' tool on the Manage tab > Update panel, after coming back to the main assembly from the opened part document, but before trying to change its parameter value again?  Have you tried closing the iLogic Form before going over to the part document, then reopening it when you get back to the main assembly?  The iLogic Forms tend to be document specific/focused, especially local/internal ones, and may act odd when going back and forth between multiple documents while it remains open.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

Pav3L
Advocate
Advocate

Hi @WCrihfield ,

Have you tried clicking on the 'Rebuild All' tool on the Manage tab > Update panel, after coming back to the main assembly from the opened part document, but before trying to change its parameter value again? 

I have tried it and it has no effect, the error still appears.

 

Have you tried closing the iLogic Form before going over to the part document, then reopening it when you get back to the main assembly?

I have tried it and it has no effect, the error still appears. Even without using the form (form deleted) and just changing the parameters in the Parameter window the error will appear.

0 Likes
Message 4 of 5

Pav3L
Advocate
Advocate

We have upgraded to Inventor 2023 and the error is still present... 😞

0 Likes
Message 5 of 5

MjDeck
Autodesk
Autodesk

@Pav3L , this is a model states limitation. To work around it, you do not have to restart Inventor. All you have to do is close the assembly. This is counterintuitive, but it works. Save the assembly and/or components if you have changes that you want to keep. But you have to close everything.

Please try it and let me know if it works for you. I can explain in more detail. The behavior has to do with factory documents and member documents.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes