Revit Unit Conversion

Hi all,

I have a workflow I’m testing where I’m updating space parameters in a GH script and sending them to Speckle. I calculated the airflow for this parameter in L/s and used the Parameter Updater to send the new value to Speckle. When I pull everything back into Revit, the values are at least two orders of magnitude off. It’s not a straight conversion, either, because they’re not just multiplied by 1000 (my first thought was since the Speckle stream had ‘mm’ as units for some reason, it may have just been the conversion gone wrong, but I switched the units to m and it didn’t fix anything). Has anyone else had experience with trouble-shooting this? I still have no idea what could be causing it or what units the add-in could think the parameter’s being sent in. Any help would be greatly appreciated!

Please see below for my current Revit units, and the data structure in the Speckle stream.

commonunits

2 Likes

Hey Lydia,

That’s because the ParameterUpdater doesn’t currently let you specify the actual units of the parameter and just takes them from the active Doc.

Therefore when that parameter is received, the connector assumes those are meters (or mm) and converts them to feet (Revit’s internal unit for length).

I’ve created an issue for us to look into it next sprint: Schema Builder Parameters: let users specify the units · Issue #812 · specklesystems/speckle-sharp · GitHub

Will keep you posted!

Hi Lydia,

I’ve just added support for this and will be available in the next release.
You can see that now the Parameter components have an optional Units input.
Here’s how it works (also in our docs):

  • if using a length based parameter (eg Base Offset) you don’t need to set the units. Speckle will automatically pick the ones sent in the current Rhino document and convert them to Revit (unless you want to override them)
  • if using a non length based parameter (eg Air FLow) you should set the units to none. Speckle will then simply assume the value used matches the display units being use in Revit (eg L/s) and will not convert them.

Hope it helps!

1 Like