2023-02-28 06:39 PM
I have a custom property that is doing an Occupancy Calculation... Dividing the space area by the Occupancy Load Factor. In a schedule the result of the calculation has SqFt units - What is the most elegant way to remove the units?
2023-02-28 08:18 PM
I assume you are using a expression to do a calculation. But you probably have the data type set to area which will include units. Use STRCALUNIT(value) To convert to a string, then use TextJoin to add any annotation on the end
2023-02-28 09:22 PM
yes - I can make that work.
I will have to convert it back into a number so I can sum it in a schedule.
Thanks
2023-03-01 02:10 AM
Or set the expression data type as a number and divide your calculation by 1 SqFt
i.e. (expression_calculation)/1ft2
That will change the area to a number, and you won't need to do any string conversions.
To get rid of any units you divide by 1xunit.
Barry.
2023-03-01 02:30 AM
Converting to a raw number is another path which will definitely lead to the same result.
I assumed that the OP would ultimately want a string annotation on the end as in: "100 person max occupancy"
In that case, i still think it would be better to directly convert the area cal to a string as strcalunit() automatically lobs off the area units. Then allowing for a direct string join of the annotation on the end. --- six vs half dozen
However, the OP did mention he wanted to sum the occupants,-- don't know why, in which case converting to a raw number is the only choice.
2023-03-01 03:48 PM
Thanks,
Yes converting to string and then back to number is what I have done in the past... Just seems like there should be a cleaner built-in way to do this.