Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

IF statement for Multiple Conditions

Jayaprakash.kookala8XTWT
Contributor

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
Reply
Accepted solutions (1)
219 Views
2 Replies
Replies (2)

pball
Advisor
Advisor
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
0 Likes

Jayaprakash.kookala8XTWT
Contributor
Contributor

Thanks for the quick response @pball . That worked.

0 Likes