is there anyway to supress i logic rule
by another rule
i have two user text parameters
named
1) Robot_pos and set to multivalue as
Robot_pos = safe Point
= Weld Point
2) Mode = ilogic
Dynamic_Simulation
Manual
and rules
1)
Robot _pos
If Robot_pos = "Safe" Then
S_Axis = "0"
L_Axis = "42"
U_Axis = "35"
R_Axis = "0"
B_Axis = "-45"
T_Axis = "33"
ElseIf Robot_pos = "Weld_Point" Then
S_Axis = "42"
L_Axis = "-5.5"
U_Axis = "15.5"
R_Axis = "-69.5"
B_Axis = "-4.5"
T_Axis = "49"
End If
2nd Rule
Mode rule
If Mode = "Dynamic_Simulation" Then
Constraint.IsActive("S_Axis") = False
Constraint.IsActive("L_Axis")= False
Constraint.IsActive("U_Axis")= False
Constraint.IsActive("R_Axis")= False
Constraint.IsActive("B_Axis")= False
Constraint.IsActive("T_Axis")= False
ElseIf Mode = "Ilogic" Then
Constraint.IsActive("S_Axis") = True
Constraint.IsActive("L_Axis")= True
Constraint.IsActive("U_Axis")= True
Constraint.IsActive("R_Axis")= True
Constraint.IsActive("B_Axis")= True
Constraint.IsActive("T_Axis")= True
End If
what i wanted is in 2nd Rule
If Mode = "Manual" Then
suppress Robot_pos rule
End if
Solved! Go to Solution.
Solved by MjDeck. Go to Solution.
There might be other ways to do what you want to do. You might be able to use a True/False (Boolean) parameter. But if you need it, here's code to suppress a rule:
auto = iLogicVb.Automation
auto.GetRule(ThisDoc.Document, "Robot_pos").IsActive = False
@MjDeck wrote:There might be other ways to do what you want to do. You might be able to use a True/False (Boolean) parameter. But if you need it, here's code to suppress a rule:
auto = iLogicVb.Automation
auto.GetRule(ThisDoc.Document, "Robot_pos").IsActive = False
Thanks it worked
what are the other ways
and one more thing
if Mode = Dynami_simulation
then it has to switch to dynamic Simulation Environment
Elseif Mode = ilogic
it has to switch to part environment
is this possible
I'm not sure if you can switch to the Dynamic Simulation environment and also switch back to the Assembly environment with a rule.
Here's an alternative to suppressing a rule:
Create a True/False parameter named Robot_pos_Enabled
Add this line to the top of your Robot_pos rule:
If (Not Robot_pos_Enabled) Then Return
That will return (exit from the rule immediately) if Robot_pos_Enabled is False.
Then you can control the value of Robot_pos_Enabled in another rule.