iLogic [Event Trigger] API for [Run these rules when events occur] check box?

iLogic [Event Trigger] API for [Run these rules when events occur] check box?

Josh_Hunt
Advocate Advocate
1,270 Views
5 Replies
Message 1 of 6

iLogic [Event Trigger] API for [Run these rules when events occur] check box?

Josh_Hunt
Advocate
Advocate

I have many rules inside my parts that need to be triggered by Events. I just now realized that [Run these rules when events occur] check box is an APPLICATION setting. The triggers below are FILE settings.

 

Is there an API to this checkbox?

 

image.png

Josh Hunt
0 Likes
Accepted solutions (1)
1,271 Views
5 Replies
Replies (5)
Message 2 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@Josh_Hunt,

 

There is a way to add a rule to event trigger through VBA code. but, Inventor API does not support to check and uncheck check box for "Run these rules when events occur". Below articles would help to add a rule to event triggers.

 

http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-tri...

 

http://adndevblog.typepad.com/manufacturing/2015/01/add-external-ilogic-rule-to-event-trigger.html

 

https://forums.autodesk.com/t5/inventor-customization/adding-an-ilogic-rule-to-an-event-trigger-with...

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 6

C-Hoppen
Advocate
Advocate

Is there an API to this checkbox?

 

C-Hoppen_0-1614156008849.png

Maybe you are lokking for this property?

Regards

Chris

 

0 Likes
Message 4 of 6

greggeorgi
Contributor
Contributor

That setting is not the same as the checkbox. The checkbox is an application/persistent setting that cannot be called by the API on purpose for security intentions. The API call for RulesOnEventsEnabled is an API only accessible, session dependent trigger. It will reset to true on restart always. (Note this applies to the newer event interface/handling)

0 Likes
Message 5 of 6

greggeorgi
Contributor
Contributor

You could possibly modify the xml preference file manually, but Im pretty sure an inventor restart would be required to reload the settings

 

C:\Users\<USER>\AppData\Roaming\Autodesk\Inventor 2020\iLogicPreferences\iLogicOptions.xml

0 Likes
Message 6 of 6

Josh_Hunt
Advocate
Advocate

@greggeorgi Thank you but %APPDATA%\Autodesk\Inventor 2020\iLogicPreferences\iLogicOptions.xml does not hold that setting. I think @chandra.shekar.g is correct, that checkbox is a manual user change only.

Josh_Hunt_0-1615814241699.png

 

Josh Hunt
0 Likes