What is iLogic code for "re-run all rules?'

What is iLogic code for "re-run all rules?'

acadadmin3KNUF
Advocate Advocate
972 Views
2 Replies
Message 1 of 3

What is iLogic code for "re-run all rules?'

acadadmin3KNUF
Advocate
Advocate

Hello to all:

 

What is the iLogic command to re-run every rule in a single part document, if there is one?

0 Likes
973 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor

You can use this code as first approach. This rule MUST BE external rule. 

For Each rule In iLogicVb.Automation.Rules(ThisDoc.Document)
	iLogicVb.Automation.RunRuleDirect(rule)
Next

 

Message 3 of 3

WCrihfield
Mentor
Mentor

Hi @acadadmin3KNUF.  Here is another one that should work for you.  There is a button for this command on the Manage tab > iLogic panel, called Regenerate All Rules.  When you click it, it will run all of the local/internal rules in that document, as part of what it does.  You can read more about it by hovering your mouse over it.

 

ThisApplication.CommandManager.ControlDefinitions.Item("iLogic.RegenAllRules").Execute

Warning:  Make sure the document you want to work on is currently, visibly open on your screen, not just a referenced document of an assembly that you may have open, because there is no way to tell it which document you want it to work on.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)