I have a metric project and I have a metric mass family (a building) I have brought into a site file. I've shared a choice few parameters from the family with the project and am using Dynamo to control them.
Here's my question: When I place a value to control the Height, for instance, I type "106". I check the value in Vasari and it's reading 32.3088m. I have another slider controlling "Twist". I've limited the values to -10 to 10 yet when enter a value it shows in Vasari as some duplicate of 57.296. I had to divide the number I wanted (10) by 57.296 in Dynamo to get the "10" to be the value of the angle. What's up with that?
My first thought were these values were imperial conversions, but that doesn't seem to be the case. Any help would be appreciated
Thanks for the insight. This is what I needed to know.
I wouldn't say it was a shortcut. If the API were based on SI units (i.e. meters) people working in Imperial units would have the same problem you are having. When creating an API, you have to choose a default unit, and I wouldn't be surprised if they chose imperial units simply because Revit was built in the USA.
Before we get around to coding a back-end conversion, you can create your own user-created conversion node, and just plug it in between any numeric inputs and nodes that use those values. For instance, if you want to enter your values as decimal meters, create a node that multiplies that value by 3.28084.
I was told by an insider that the programmers of early revit took a shortcut... and we are still suffering from that decision.
Your first intuition was correct. The Revit API returns decimal feet as the default for linear measurements and radians as the default for angular measurements.
1 radian = 57.29 degrees
109 ft * .304m/ft. = 33.136m.
Why the Revit API would not use SI units, only God knows. Just be warned, you’ll need to convert all the values coming back from Dynamo yourself…
Or you could just make a conversion node