Catch iLogic exceptions/errors via API (external program)

Catch iLogic exceptions/errors via API (external program)

Majjek
Advocate Advocate
1,415 Views
3 Replies
Message 1 of 4

Catch iLogic exceptions/errors via API (external program)

Majjek
Advocate
Advocate

Hi,

 

Is there a way to somehow catch iLogic exceptions/errors via API, for example in an addin or application?

For example, if wrong input is provided in a model, an iLogic rule can give an exception which isn't caught in the iLogic rule.

I know that the rule ofcourse should be programmed correctly, so that errors will be caught there, but sometimes I want iLogic to give me the exceptions and I want to be able to catch them.

 

My situation: I have an external program, which launches Inventor and does some actions.

In some cases, an iLogic rule in the model can give an exception, which causes my program to 'freeze'.

I want to know if it's possible to catch these exceptions and continue and be able to return the error message to the program.

For example via events if there are any in the iLogic automation.

 

Thanks in advance.

0 Likes
Accepted solutions (1)
1,416 Views
3 Replies
Replies (3)
Message 2 of 4

AlexKorzun
Autodesk
Autodesk
Accepted solution

You may explore the iLogic's automation. It has a property .RuleExceptionsLog documented at:
http://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=88f75594-dc20-e503-f909-e527fd712a36

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

0 Likes
Message 3 of 4

Majjek
Advocate
Advocate

Thanks for the fast response, I was already browsing through this documentation.

I was about to do some tests, with silentoperation in combination with the exceptionslog.

0 Likes
Message 4 of 4

Majjek
Advocate
Advocate

I managed to reach my goal by using SilentOperation of the iLogic Automation to prevent the error window from popping up.

Afterwards I was able to view all the occurred exceptions via the ExceptionsLog.

0 Likes