Revit schedule IF statement

Revit schedule IF statement

Jrooker06
Collaborator Collaborator
11,974 Views
8 Replies
Message 1 of 9

Revit schedule IF statement

Jrooker06
Collaborator
Collaborator

I want to create a If statement that will return a value between two things.

 

I have 3 columns that we will call column A, column B, and column C

 

column 'B' will always have a default text in it like lighting and column 'C' will be blank.  I want column 'A' to always bring in Column 'B' until I place something in column 'C' then i want Column 'A' to bring in 'C'

 

what will this formula look like?

0 Likes
Accepted solutions (1)
11,975 Views
8 Replies
Replies (8)
Message 2 of 9

L.Maas
Mentor
Mentor

Same like in families. This is unfortunately not possible you can do something for types like numbers and lengths. But IF statements does not work on the text type.

 

Example 1

A = "Apple", B= "Banana" A, B, C of type text, C is the calculated value

C: IF(A="Apple", "Apple", "No Apple")

Will generate an error

 

Example 2

A = 1, B= 2  A, B, are integers  and C is of type text, C is the calculated value

C: IF(A=1, "Apple", "No Apple")

Will work

 

So comparing text will not work.

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 3 of 9

Jrooker06
Collaborator
Collaborator

Using example 2 is there a way to make A=''''(nothing) so if Cell A is blank it will return a value? or does it have to be a  calculated value still?

 

Example 2

A = 1, B= 2  A, B, are integers  and C is of type text, C is the calculated value

C: IF(A=1, "Apple", "No Apple")

0 Likes
Message 4 of 9

jdiala
Advocate
Advocate
Accepted solution

Not possible, since you can't test if the parameter value is a text. See family attached and go to family types.

0 Likes
Message 5 of 9

Jrooker06
Collaborator
Collaborator

So if I am reading this correctly, you are controlling the statement with a yes/no parameter. By having the box checked then it will pull in your text.

0 Likes
Message 6 of 9

jdiala
Advocate
Advocate
Yes, that's the only way to do it.
0 Likes
Message 7 of 9

Jrooker06
Collaborator
Collaborator

would the formula be the same say if the false statement was pulling in the space name. [   =if(C,Space Name,b)   ]

0 Likes
Message 8 of 9

jdiala
Advocate
Advocate
I know where you are going. Revit formula is different with lisp. So far you can't test an expression if your test value is a text. You can only test if it's a numeric value or yes/no.
0 Likes
Message 9 of 9

Jrooker06
Collaborator
Collaborator

Okay,

 

But do you think if i tie a yes/no to a space name in the schedule that it would pull in the space name?

0 Likes