PDA

View Full Version : Rounding question in Revit 2013 also in a schedule.



caddman13
2012-05-10, 11:26 AM
I am working on getting occupancy loads. I can get the schedule to round to the nearest whole number as long as it follows the rule 1.1 =1 and 1.6 = 2. But the code says anything over 1.00 is to round up to the next higher number so 1.1 = 2 and so on.

Here is the struggle I have been having. I can get the .3 and .7 to round to 1 but I can get anything like 1.1 to round up to 2 or the 22.23 to round to 23. The formula I have in the calculated value is as follows:

if(round(Area / Occupancy Load Factor) / 1 ^ 2 < 1, 1, (Area / Occupancy Load Factor) / 1 ^ 2)

This works great on rounding to 1 and using the 1.1 =1 method.

What would I need to add to or modify to get the formula above to round the .33 to 1 and the 1.1's and the 22.23 to round up to the next highest number?

I am very rusty at IF statements and need some guidance.

Thank you for the help.

jsteinhauer
2012-05-10, 12:09 PM
Could it be as simple as adding .49 to your formula? You might not want to be calculating a number parameter either, try using an integer instead.

Cheers,
Jeff S.

caddman13
2012-05-10, 12:27 PM
Jeff,

Thank you very much. I was so close but yet so far away. That worked great.

Thanks again.

LP Design
2012-05-14, 03:13 PM
I currently use the +.49 method, but I did see that as of 2012 you can use a RoundUP formula:
http://wikihelp.autodesk.com/Revit/enu/Community/Tips_and_Tricks/Families%2c_Parameters%2c_Formulas/Round_Function_in_Formulas
http://wikihelp.autodesk.com/Revit/enu/Community/Tips_and_Tricks/Families%2c_Parameters%2c_Formulas/Use_Round_function_for_Length_and_Area_parameter

I will be implementing this change the next time we upgrade our templates, but for now I am leaving it alone so as to not break the existing system.
-LP