Nested IFs cause unexpected end of expression error

Nested IFs cause unexpected end of expression error

eumanzorLAARC1
Explorer Explorer
2,131 Views
3 Replies
Message 1 of 4

Nested IFs cause unexpected end of expression error

eumanzorLAARC1
Explorer
Explorer

I'm trying to create a conditional if statement in an area schedule for occupancy load calculations, but I'm not sure if my syntax is correct or if the statement is flawed, because I keep getting an "Unexpected end of expression" error message, please help.

 

IF (Name="BUSINESS", Area/100, IF (Name = "MECHANICAL", Area/300, IF (Name = "MERCANTILE", Area/30, IF (Name = "STORAGE", Area/300, IF (Name = "KITCHEN", Area/200, 0))))

 

 

0 Likes
2,132 Views
3 Replies
Replies (3)
Message 2 of 4

RDAOU
Mentor
Mentor

@eumanzorLAARC1 

 

based on the number of nested IFs you are missing a bracket at the end.

 

However it wont work even if you get the closing brackets right, Reason: you are using TEXT as a condition in a formula that is not possible in Revit atm...it can be used only as a result

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 3 of 4

barthbradley
Consultant
Consultant

You can't reference a Text Parameter.  You could reference an integer. For instance =If(Integer Parameter=1, "My Text", "My Other Text") 

0 Likes
Message 4 of 4

eumanzorLAARC1
Explorer
Explorer

Thank you guys, I think I can find a work around from there.