Originally Posted by
jim.155208
I need help doing a formula in a Property Definition. I want the property to evaluate a space, determine which building code occupancy type I've assigned to the room, then return an occupant load.
I've tried both If...Then...Else statements and Select Case statements. I can get it to work with the first argument I give it, but it won't continue. It always returns the value for the first case no matter if that case is true or not.
Here is my formula:
Select Case [ADAFinishObj:OccupancyType]
Case Classroom
RESULT =[BaseArea]/20
Case Mechanical
RESULT =[BaseArea]/300
Case Else
RESULT ="--"
End Select
It should evaluate the ADAFinishObj:OccupancyType property definition. If that value is "Classroom" it should take the BaseArea and divide by 20. If the OccupancyType value is "Mechanical" is should take the BaseArea and divide by 300. I always get the divided by 20 value regardless of what the OccupancyType is. It never says hey, it's not this one, let's look at the next one.
I’ve tried the exact same thing with If…Then…Else statements, and get the same results. Here is that formula:
If [ADAFinishObj:OccupancyType] = Classroom Then
RESULT =[BaseArea]/20
ElseIf [ADAFinishObj:OccupancyType] = Mechanical Then
RESULT =[BaseArea]/300
End If
Please help!
JK