Ability to communicate with AddIn or get back that rule has ended...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an AddIn that runs certain iLogic rules based on events.
Changing Active Project and Logging In and Out of the Vault are events where I cannot directly start a rule (due to the lack of a DocumentObject).
I thought I was clever and created a Boolean "EnvironmentHasChanged" in the AddIn. Logging into the Vault with the same name or changing Active Project with the same name results in a False. Other situations in a True.
Then, when events occur involving a DocumentObject (and my RunRule routine is called), I send the previously mentioned Boolean along as Argument (NameValueMap).
One of the last rules in my RuleRun routine is resetting the Boolean back to False.
This works quite well, until events occur that cause a Rule to be called very quickly one after the other.
The module calling the ExternalRule is run, but Inventor ignores the call until the Rule has been run. This is nice behavior, except for the fact that my Boolean is reset before an iLogic rule can do anything with it.
My question: is it possible to get feedback from Automation from the AddIn that the Rule has run? Seems best to me, because then no unnecessary Rule calls are made.
Otherwise, is it possible to have the iLogic rule reset the value of the Boolean?
I think the latter is difficult because I was previously, for unclear reasons, unable to follow Jeltes s suggestion for unclear reasons (keep getting error "Object variable or With block variable not set" in Inventor).
The last option that I can think of is that I should set a condition that within a time slot (of a few seconds) the same DocumentObject can only run a Rule once.
Other suggestions are welcome!
Inventor 2023.5.1
René van der Starre