Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Jayaprakash.kookala8XTWT
217 Views, 2 Replies

IF statement for Multiple Conditions

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

 

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

Thanks for the quick response @pball . That worked.