latest version 2022.1 Keeps throwing this error???

latest version 2022.1 Keeps throwing this error???

D0UGLAS
Collaborator Collaborator
1,540 Views
12 Replies
Message 1 of 13

latest version 2022.1 Keeps throwing this error???

D0UGLAS
Collaborator
Collaborator

System.Runtime.InteropServices.COMException (0x80004005): Erreur non spécifiée (Exception de HRESULT : 0x80004005 (E_FAIL))
à System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
à Inventor.ComponentOccurrence.set_Visible(Boolean )
à iLogic.ComponentInRule.set_Visible(Object componentName, Boolean value)
à ThisRule.Main()
à Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
à iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

0 Likes
Accepted solutions (3)
1,541 Views
12 Replies
Replies (12)
Message 2 of 13

SharkDesign
Mentor
Mentor

Are you running an iLogic rule?

If not, one might be getting triggered. Check event triggers in the ribbon bar or check the iLogic browser pane to see if there are any rules in there randomly during when you change parameters.

 

  Inventor Certified Professional
0 Likes
Message 3 of 13

D0UGLAS
Collaborator
Collaborator

Hi James,

Yes, it's ilogic related my code doesn't funtion since the update today.

0 Likes
Message 4 of 13

SharkDesign
Mentor
Mentor
Ohhhhh, I see now. Sorry I can't help with that. Try the inventor
customisation forum. They are better equipped for this type of thing.
  Inventor Certified Professional
0 Likes
Message 5 of 13

MjDeck
Autodesk
Autodesk

@D0UGLAS , did the same model work in Inventor 2022?
Can you post a simple model that shows the error?


Mike Deck
Software Developer
Autodesk, Inc.

Message 6 of 13

D0UGLAS
Collaborator
Collaborator

Hi Mike, yes it did, I have sent you a private message.

In the meantime I am going to roll back versions.

0 Likes
Message 7 of 13

D0UGLAS
Collaborator
Collaborator
Accepted solution

Uninstall update!

0 Likes
Message 8 of 13

karthur1
Mentor
Mentor

Error disappeared after rolling it back to original 2022?

 

 

0 Likes
Message 9 of 13

D0UGLAS
Collaborator
Collaborator

Yes, I am running the previous version 2022.01.

0 Likes
Message 10 of 13

MjDeck
Autodesk
Autodesk
Accepted solution

@D0UGLAS , thanks for reporting this. I verified that it is a regression and logged it as INVGEN-54747. The problem is in the Component.Visible function. Code such as:

Component.Visible("Part1:1") = False

Will throw an error if the component "Part1:1" is suppressed. To work around it, you can add a test to make sure the component is not suppressed:

If Component.IsActive("Part1:1") Then Component.Visible("Part1:1") = False

In 2022.1, that workaround will do exactly the same thing that the original code did in 2022.0. The original function would not actually call the API to set the visibility if the component is suppressed. The API will throw an error on that.


In your model, the component that shows this problem is "GRX", referenced in the rule 10_TOUS. Instead of adding code, maybe you can actually take out the calls to Component.Visible in this case. You're setting it invisible and also suppressing it (and vice versa : unsuppressing and also setting it visible). Is it necessary to set both the visibility and the suppression status?


Mike Deck
Software Developer
Autodesk, Inc.

Message 11 of 13

D0UGLAS
Collaborator
Collaborator

Thanks Mike, I will look into this!

 

How did you identify the part with this issue?

0 Likes
Message 12 of 13

MjDeck
Autodesk
Autodesk

I attached Visual Studio to the Inventor process as a debugger, and set it to break on exceptions. That lets you see the line where the error occurred. Here's details on how to do it. Here's a video.


Mike Deck
Software Developer
Autodesk, Inc.

Message 13 of 13

MjDeck
Autodesk
Autodesk
Accepted solution

This problem is fixed in the Inventor 2022.2 update.


Mike Deck
Software Developer
Autodesk, Inc.