Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

'Run All Rules' API command

Anonymous

'Run All Rules' API command

Anonymous
Not applicable

Does anybody know what the API command is for 'Run All Rules' in iLogic?

Run All Rules.JPG

0 Likes
Reply
831 Views
2 Replies
Replies (2)

MechMachineMan
Advisor
Advisor

From what I can tell in control definitions, there is none.

 

however, something like this will work assuming you are connected to the addin in vb.net

 

https://forums.autodesk.com/t5/inventor-customization/ilogic-api-documentation/td-p/6785772

 

iLogicAuto = iLogicVb.Automation
'MsgBox(iLogicAuto.iLogicRules.Count)
For Each oRule In iLogicAuto.Rules(ThisApplication.ActiveEditDocument)
       MsgBox(oRule.Name)
	   iLogicAuto.RunRuleDirect(oRule)
Next

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type

Anonymous
Not applicable

@MechMachineMan 

Thanks MechMachineMan, this only runs all the rules in the currently open document, not in its sub-components also, is it possible to adjust it to do that?

I'm guessing its ThisApplication.ActiveEditDocument that needs to be changed?

0 Likes