Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Suppress ilogic rule

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ravikmb5
6003 Views, 3 Replies

Suppress ilogic rule

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

 

Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





3 REPLIES 3
Message 2 of 4
MjDeck
in reply to: ravikmb5

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

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 4
ravikmb5
in reply to: MjDeck


@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

 

Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





Message 4 of 4
MjDeck
in reply to: ravikmb5

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.

 


Mike Deck
Software Developer
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report