Quick Links - Also see the menu above and more choices on the right side of the blog (too much, but all good stuff)

\/ ...and now BIMbuilder.com Blog Posts... \/

Tuesday, April 20, 2010

Inconsistent Units - The Revit Clinic

Source: http://revitclinic.typepad.com/my_weblog/2010/04/inconsistent-units.html

Screen shot  2010-04-19 at 10.27.07 AM

Have you seen this message when working in a family or editing formulas in a Schedule?

I run into this myself sometimes within the Family editor or in a Calculated Value in a schedule. Here is a example I ran into the other day.

I wanted to calculate the cost of a material based on its Area and the amount that material costs per SF in Revit. I started with a Material Takeoff Schedule and added the Material: Area parameter and the Cost Parameter. Then, I added a calculated value parameter to the schedule. I wanted a cost of the material so I made the parameter a Currency parameter type and entered my formula. Oops, I got the Inconsistent Units message.

Screen shot  2010-04-19 at 10.42.25 AM

The problem is that the Revit doesn't understand how to get an area to be a currency. We understand as humans because we can process the units ourselves. We can comprehend which unit type we want in the end, but Revit sees the Area as a square footage unit and simply sees the cost as a number. For Revit, cost is just a multiplier of the Area (cost really has no unit value in Revit) so Revit wants a Area in the end because that is all it knows.

Quickly change the parameter type to a Area, and Revit accepts the formula. However, I don't really like that as a final solution. Revit now displays the MyCost parameter I made as a SF measurement, not a amount like I want.

Screen shot  2010-04-19 at 10.48.22 AM

So how do we get a number here? We need to remove the units from the Material: Area or from the MyCost parameter by dividing the parameter by 1 Square Foot. You can either do it before you calculate the final cost or after, you will get the same results. This trick can be used in tons of situations to get the values you need.

Screen shot  2010-04-19 at 10.52.51 AM

It is good to think of most parameters (not linked to geometry) as not having units assigned to them and instead type the units in the name of the parameter.

Using Number parameter types for your calculations, allows Revit to compare numbers with numbers and you don't have to worry about what it thinks of the units. You can then use Units that Revit might not support or understand in the parameter name, but simply have them be numbers for the actual calculations that Revit performs.

Removing units is as easy as making a new parameter that is a Number parameter type and taking your original parameter and dividing it by 1 of the original unit. This works for Lengths, Volumes, and Areas as the above screen shot shows.

I'd be very interested to hear your experiences with parameters in families or schedules and calculations with units. Let me know what you think.

Inconsistent Units - The Revit Clinic


  © Blogger template ProBlogger Template by Ourblogtemplates.com 2008

Back to TOP  

[Valid Atom 1.0]