- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Regenerate all Rules vs Run all Rules
Whats the difference between 'Regenerate all Rules' and 'Run all Rules' ?
Solved! Go to Solution.
Link copied
Whats the difference between 'Regenerate all Rules' and 'Run all Rules' ?
Solved! Go to Solution.
The difference is in background. The iLogic code can't be executed directly. It must be compiled before.
Regenerate - compiles and executes the rule
Run - just run the rule without compilation
If you test the rule bellow, there are small differences.
Sub main
Logger.Debug(i)
i += 1
End Sub
Private Shared i As Integer = 1
Run results
INFO| 19: >>---------------------------
DEBUG|1
INFO| 20: >>---------------------------
DEBUG|2
INFO| 21: >>---------------------------
DEBUG|3
Regenerate results
INFO| 22: >>---------------------------
DEBUG|1
INFO| 23: >>---------------------------
DEBUG|1
INFO| 24: >>---------------------------
DEBUG|1
Hi @adam_liMNCRV. Another difference is that the 'regenerate' action will also reconnect any parameters who's links have been broken, if any, while just running the rule(s) will not. For instance, if the internal iLogic rule contained some blue, unquoted names of local parameters within it, then you deleted or renamed one or more of them, then recreated or changed their names back to the original. That would normally break the automatic connection / triggering action inherent to using parameters that way. To fix that link/connection/automatic triggering again, regenerate the rule(s). This may also happen if you create the rule, before the parameter exists yet, then create the parameter afterwards. The connection / triggering will not be in effect in the rule yet, until you regenerate the rule. Usually...it's been a while since I encountered a similar scenario, but that's how it worked last time I had to use it.
Wesley Crihfield
(Not an Autodesk Employee)
Hi @Michael.Navara. What you posted looks pretty interesting, but when I tried it I do not get results like that. No matter if I run the rule, or regenerate the rule, I just get empty entries in the iLogic Logger window.
I ran this both way many times, but the results show below are...the first 3 are regular Run Rule, while the second 3 are Regenerate Rule. I am running Inventor Pro 2024.3 on Windows 11 PC, if that matters I am not sure.
Edit: Nevermind...forgot about Log Level setting...it was set to Info level.
Wesley Crihfield
(Not an Autodesk Employee)
OK - duplicate deleted 😀