IF statement for Multiple Conditions

IF statement for Multiple Conditions

Jayaprakash.kookala8XTWT
Contributor Contributor
511 Views
2 Replies
Message 1 of 3

IF statement for Multiple Conditions

Jayaprakash.kookala8XTWT
Contributor
Contributor

Hi, I am trying to set the value of parameter (Stringer_Width) based on another parameter (Ladder_Rise). Below iLogic code works for the first 2 conditions (Stringer Width 2.5 and 3). But not getting the 3rd and 4th conditions running. For some reason code stops to first 02 conditions. Any help on this would be greatly appreciated. Thank you...JP

If Ladder_Rise <= 180 Then
	Parameter("Stringer_Width") = 2.5
ElseIf Ladder_Rise > 180 <= 360 Then
	Parameter("Stringer_Width") = 3
ElseIf Ladder_Rise > 360 <= 540 Then
	Parameter("Stringer_Width") = 3.5
ElseIf Ladder_Rise > 540 <= 720 Then
	Parameter("Stringer_Width") = 4
End If

 

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

pball
Mentor
Mentor
Accepted solution

You should use this format with an if statement.

 

If Ladder_Rise <= 180 Then
	Parameter("Stringer_Width") = 2.5
ElseIf Ladder_Rise > 180 And Ladder_Rise <= 360 Then
	Parameter("Stringer_Width") = 3
ElseIf Ladder_Rise > 360 And Ladder_Rise <= 540 Then
	Parameter("Stringer_Width") = 3.5
ElseIf Ladder_Rise > 540 And Ladder_Rise <= 720 Then
	Parameter("Stringer_Width") = 4
End If

 

Check out my style edits for the Autodesk forums
pball's Autodesk Forum Style

Userscript to edit forum links to jump to first unread post
Jump To First Post Userscript
0 Likes
Message 3 of 3

Jayaprakash.kookala8XTWT
Contributor
Contributor

Thanks for the quick response @pball . That worked.

0 Likes