To get an event triggered in the main plugin code when we click run rule for iLogic rule(internal rule) .

To get an event triggered in the main plugin code when we click run rule for iLogic rule(internal rule) .

Anonymous
Not applicable
540 Views
4 Replies
Message 1 of 5

To get an event triggered in the main plugin code when we click run rule for iLogic rule(internal rule) .

Anonymous
Not applicable

Hello guys, I am new to inventor and have been doing some programming related to Addins, just recently I started reading about iLogic rules and I am faced with the task to get an event triggered in the main code(the code for Addin) when we click on Run Rule of an internal rule created for some assembly which is currently opened in the inventor.

The main constraint is we are not creating the iLogic rule, but we need to get an event triggered in our code when we click run rule.

0 Likes
541 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

I'm not an add-in guru, but I'm familiar with creating custom event handlers, and I don't think there is a pre-defined event (or method for handling the event) for when someone manually runs an iLogic rule that is exposed to Inventor's API at this time.  I couldn't even find the name of a ControlDefinition that might be executed when you manually run an iLogic rule, so I don't think you could even monitor for when that specific command is executed.

I could be wrong, but likely the only folks that know are going to be the folks who work for Autodesk directly, or maybe someone in their developer's network.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thank you for your reply, will wait for any surprises to come from the answers, but thank you for verifying some of my findings.

0 Likes
Message 4 of 5

JelteDeJong
Mentor
Mentor

Probably it not much help but just in case... 

Maybe the IiLogicAutomation.EnterDelayedRuleRunningMode is some help to you. It will not give you a nice trigger but if you are running a process it can help to stop iLogic rules from running until you want them to run. Or if you know that the rule is going to be triggerd then put iLogic in this "delayed rule running mode". Do your stuff and exit the "delayed rule running mode. 

 

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

Message 5 of 5

Anonymous
Not applicable

Thank you for the reply and the suggestion, will try playing around with what you suggested, it's much better than blindly searching for a solution.

0 Likes