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: 

Skip rule

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
GosponZ
441 Views, 4 Replies

Skip rule

I'm running one rule with few rules inside but i need one rule in certain situation to skip. It would be the best to be as boolean param. yes to run that rule and no to skip and to go on next rule until is done.

Can you guys help

Thank you

4 REPLIES 4
Message 2 of 5
Vladimir.Ananyev
in reply to: GosponZ

If you  add boolean user parameter e.g. NeedRule to your model, then the following rule could call the dependent rule "ruleName" only if NeedRule = True

If NeedRule Then
  iLogicVb.RunRule("ruleName")
End If

Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
GosponZ
in reply to: Vladimir.Ananyev

I fixed now is working

Thank you

 

Message 4 of 5
Vladimir.Ananyev
in reply to: GosponZ

Great!


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
GosponZ
in reply to: Vladimir.Ananyev

This rule came from Vladimir Ananyjev
It is working very well. Thank you

MsgBox("Start of Main Rule") 'Run rule 1 iLogicVb.RunRule("Rule1") 'Run rule 2 iLogicVb.RunRule("Rule2") R = MessageBox.Show("Do you want to run Rule3 ?", _ "Ask user for decision", _ MessageBoxButtons.YesNo, _ MessageBoxIcon.Question) If R = vbYes Then 'Run rule 3 iLogicVb.RunRule("Rule3") Else MsgBox("Skip Rule3") End If

 

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

Post to forums  

Autodesk Design & Make Report