Supported Conditional Operators (greater or equal, smaller or equal)

Supported Conditional Operators (greater or equal, smaller or equal)

Anonymous
Not applicable
24,279 Views
4 Replies
Message 1 of 5

Supported Conditional Operators (greater or equal, smaller or equal)

Anonymous
Not applicable

According to this "Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b)".

 

This was for Revit 2013, Revit 2014, Revit 2015...and now also for Revit 2016?

 

Why are two basic conditional operators (<= and >=) not implemented?

0 Likes
Accepted solutions (1)
24,280 Views
4 Replies
Replies (4)
Message 2 of 5

daniel.kohlmann
Explorer
Explorer

A conditional statement uses this structure: IF (<condition>, <result-if-true>, <result-if-false>)

This means that the values entered for the parameter depend on whether the condition is satisfied (true) or not satisfied (false). If the condition is true, the software returns the true value. If the condition is false, it returns the false value.

 

Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters. You can use the following comparisons in a condition: <, >, =. You can also use Boolean operators with a conditional statement: AND, OR, NOT. Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b).

 

The following are sample formulas that use conditional statements.

Simple IF: =IF (Length < 3000mm, 200mm, 300mm)

IF with a text parameter: =IF (Length > 35', “String1”, “String2”)

IF with logical AND: =IF ( AND (x = 1 , y = 2), 8 , 3 )

IF with logical OR: =IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )

Embedded IF statements: =IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )

IF with Yes/No condition: =Length > 40 (Note that both the condition and the results are implied.)



Daniel Kohlmann
0 Likes
Message 3 of 5

daniel.kohlmann
Explorer
Explorer

We appreciate your comments and feedback. All product feature/functionality requests should be logged at the Product Feedback page. For most Media & Entertainment products click here and for all other products click here. You can log your request there. I am not sure why they have not been implemented.



Daniel Kohlmann
0 Likes
Message 4 of 5

zach_wagoner
Participant
Participant

To do a greater than or equal to or less than or equal to statement you need to use a if or statement. 

 

So if we said 

 

If(or(X<9, X=9), Y, Z)

 

So what this is saying is if X is less than or equal to 9 then Y, bit if X is greater than 9 then Z. 

 

Thats how you work around the limitations. 

Message 5 of 5

ToanDN
Consultant
Consultant
Accepted solution

IF (NOT(

 

ToanDN_0-1629145805700.png

ToanDN_1-1629145828910.png

ToanDN_2-1629145848593.png