Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to auto regenerate my rules in my layout

1 REPLY 1
SOLVED
Reply
Message 1 of 2
hugo7
143 Views, 1 Reply

how to auto regenerate my rules in my layout

I have create this two rules but i have to regenerate menially the rules, does'nt it can be done automatycally

 

the rules are cut and paste from one of autodesk forums

 

thank you for your help

1 REPLY 1
Message 2 of 2
WCrihfield
in reply to: hugo7

Hi @hugo7.  If I am understanding your request / questions, then there is a tool button for this functionality on the Manage tab, iLogic panel, where there is a button named "Regenerate All Rules".  When you click that, it will run all of the unsuppressed internal iLogic rules within the current document, but will also run all unsuppressed internal iLogic rules within all of the other documents that are referenced within the current document.  Part of its functionality though, is to fix broken links / associations between any blue, unquoted parameters that are being used in any of those internal iLogic rules, so the work correctly again.  Their functionality can sometimes get 'broken' by deleting them, then recreating them, or creating the code before the parameter existed, and some other odd actions.

WCrihfield_0-1711550195734.png

However, the below code shows you the 'ControlDefinition' behind that button, which we can find, then execute by code, to do the same thing as clicking that button.  Be careful using that code routine though.  It will act upon whichever document that is both active and visibly showing on your screen at the moment it runs.

Dim oRegenAllRules As ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("iLogic.RegenAllRules")
oRegenAllRules.Execute2(True)

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report