Ilogic min or max ?

Ilogic min or max ?

jletcher
Advisor Advisor
1,752 Views
2 Replies
Message 1 of 3

Ilogic min or max ?

jletcher
Advisor
Advisor

Not sure if title fits I will change if not right subject.

 

This is hard for me to explain but I hope you can understand what I need.

 

I am doing a tie rod the issue I have is when the length is between 2.001 and 2.250 we would drill thru all but only tap the ends .750 deep. If the part is 2.000 would would drill and tap thru in one step and not have to rotate the part in the lathe.

 

How do I get ilogic to understand if my number is between this 2.001 and 2.250 to lengthen the drill length parameter?

Or add a mid plane cut? ( trying now code below reflects this try)

 

 Not sure what way I want yet but I just can't seem to find a snippet or code to do this. I tried to add a list in the parameters for it to read but seems to do nothing.

 

I hope I am clear on my issue if not ask and I will try to fill in the blanks.

 

Thanks

 

 This is just one way I tried

If LENGTH <= "2" Then
	Feature.IsActive("Thru_All") = True
	Feature.IsActive("Hole_A") = False
	Feature.IsActive("Hole_B") = False
	iProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") &  " Ø S/S, TAP THRU 3/8-16, "  & iProperties.Value("Custom", "LENGTH") & "  LONG"
Else
	Feature.IsActive("Thru_All") = False
	Feature.IsActive("Hole_A") = True
	Feature.IsActive("Hole_B") = True
	iProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") & " Ø S/S, TAP BOTH ENDS 3/8-16, " & iProperties.Value("Custom", "LENGTH") & "  LONG"
End If


If LENGTH = (My_List) Then
	Feature.IsActive("Mid_Cut") = True

Else 
	Feature.IsActive("Mid_Cut") = False
End If

 

 

 

 

0 Likes
Accepted solutions (1)
1,753 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

If I understand correctly, you want something to occur between 2.001 to 2.25. The code you have will somewhat work but if LENGHT is 2.26 it will still do the else condition. try the following.

 

If LENGTH <= 2 then

     '2 or less, do this

Elseif LENGTH>2 and LENGTH<= 2.25 then

     'greater than 2 and less than or equal to 2.25, do this

else

     'anything else, do this

end if

 

If this is not what you are looking for, post an example.

Message 3 of 3

jletcher
Advisor
Advisor

Yep that worked I don't understand I thought I tried that but maybe I messed something and you did not..

 

  Thank you Smiley Very Happy

0 Likes