iLogic: using a rule to choose a rule

iLogic: using a rule to choose a rule

Anonymous
Not applicable
1,907 Views
2 Replies
Message 1 of 3

iLogic: using a rule to choose a rule

Anonymous
Not applicable

I'm trying to use a rule to toggle a radio button to select from 2 options: Standard or Custom

 

stnd.png

 

This rule then runs one of 2 other rules, depending upon the selection:

 

 

 

'Get user input for custom or standard size
Standard = InputRadioBox("Select size Type", "Standard Sizes", "Custom Size", Standard, Title := "Standard or Custom")

'Run rule based on selection
If Standard = True Then
iLogicVb.RunRule("Standard Size")
Else
iLogicVb.RunRule("Custom Size")
End if

 

But the problem is choosing one rule (for instance Custom Size) results in the running the Custom rule then the Standard rule right afterward. Chooseing the Standard rule, gets the opposite results.

 

Attached is a simple example of this issue (in 2010 format). Is there a way to set this up to choose which rule to run?

 

Thanks in advance.

 

P.S. The goal here is to choose between rules. I'm sure throwing one or the other of the 2 message boxes could be done in just 1 rule, but that's not really the end goal.

 

 

 

Accepted solutions (1)
1,908 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Okay, I just found a solution to this here:

 

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/iLogic-Rule-Suppression/m-p/2843626

 

See attached for solution, in case it helps someone in the future.

Message 3 of 3

MjDeck
Autodesk
Autodesk

Another (probably easier) solution is to set the Don't run automatically option for both the Standard Size and the Custom Size rule.   This is available on the Options tab in the rule editor dialog.

 

 This is required because both rules are linked to the Custom_Width and Width parameters.  So by default, when one or both of these parameters change, both rules want to run.

 

 


Mike Deck
Software Developer
Autodesk, Inc.