iLogic to suppress more then one part.

iLogic to suppress more then one part.

jostroopers
Collaborator Collaborator
402 Views
2 Replies
Message 1 of 3

iLogic to suppress more then one part.

jostroopers
Collaborator
Collaborator

I have an assy in which I want to address 3 types of parts at a certain value of the parameter 'Diepte'. I have an ilogic rule that activates a level of detail. If I activate the first value it works, part FDF033 and FDF034 are being suppressed. If I activate the second value it also works, part FDF032 and FDF034 are being suppressed. If I use the third value, part FDF034 does not become active, but everything stays the same as with the second value. Can someone help me in the right direction.
My code:
If Depth <= 1000 Then
Component.IsActive ("FDF032: 1") = True
Component.IsActive ("FDF032: 2") = True
Component.IsActive ("FDF033: 1") = False
Component.IsActive ("FDF033: 2") = False
Component.IsActive ("FDF034: 1") = False
Component.IsActive ("FDF034: 2") = False
ElseIf Depth> 1000 <= 1500 Then
Component.IsActive ("FDF032: 1") = False
Component.IsActive ("FDF032: 2") = False
Component.IsActive ("FDF033: 1") = True
Component.IsActive ("FDF033: 2") = True
Component.IsActive ("FDF034: 1") = False
Component.IsActive ("FDF034: 2") = False
ElseIf Depth> 1500 Then
Component.IsActive ("FDF032: 1") = False
Component.IsActive ("FDF032: 2") = False
Component.IsActive ("FDF033: 1") = False
Component.IsActive ("FDF033: 2") = False
Component.IsActive ("FDF034: 1") = True
Component.IsActive ("FDF034: 2") = True
End If

iLogicVb.UpdateWhenDone = True

Mvg Jos
Youre drawings are as good as the symbols that compleet them.....
0 Likes
Accepted solutions (1)
403 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

Hello @jostroopers!

 

There is a statement in your code, that should actually throw an error:

ElseIf Depth> 1000 <= 1500 Then

When checking multiple conditions on a variable/value consider making use of AND/OR-Statements:

ElseIf Depth > 1000 And Depth <= 1500 Then

Maybe this is the solution for your Problem.

 

Message 3 of 3

jostroopers
Collaborator
Collaborator

Hi arminhajrovic

I don't get an error.

But i thank you for youre answer it is the solution for me.

Mvg Jos
Youre drawings are as good as the symbols that compleet them.....
0 Likes