# Units in Dynamo 1

**URL:** <https://forum.dynamobim.com/t/units-in-dynamo-1/4599>\
**Category:** Revit\
**Tags:** lunchbox\
**Created:** [June 19, 2016, 5:45am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599 "2016-06-19T05:45:45Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbrannon4](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bbrannon4](https://forum.dynamobim.com/u/bbrannon4)\
**Post date:** [June 19, 2016, 5:45am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/1 "2016-06-19T05:45:45Z")

</div>

I’m trying to get a handle on units, which I understand should be “unitless” and just appear as the values of whatever system is chosen in Revit, since v0.8. I just pulled the cooling and heating loads which are in IP in Revit (Btu/h) but seem to be coming out multiplied by a factor of 3.15ish. Anyone else noticing this?

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 19, 2016, 5:51am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/2 "2016-06-19T05:51:06Z")

</div>

Hi Ben,

Try using “Lunchbox Get Parameter” node it will give you exact values as in Revit.

It would be better if you can drop here screenshots of your graph.

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 19, 2016, 6:11am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/3 "2016-06-19T06:11:50Z")

</div>

I see the same issue with rebar elements. The Revit API uses feet as length unit, but dynamo is supposed to be unitless. Maybe we should gather some axamples and post an issue at github [https://github.com/DynamoDS/DynamoRevit/issues](https://github.com/DynamoDS/DynamoRevit/issues)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/f/fa7d53ceaf803469f3b417db2be9dc02196b5210.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 19, 2016, 6:21am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/4 "2016-06-19T06:21:45Z")

</div>

Lunchbox Get Parameter node gives exact Units as in Revit:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/d9efa634fd358c723de3d4b78e1ff529dc040790.png)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 19, 2016, 6:23am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/5 "2016-06-19T06:23:41Z")

</div>

Not working for me, revit 2017:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/5213a847fd63862b8d6b63be8512c4b6095618c5.png)

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 19, 2016, 7:16am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/6 "2016-06-19T07:16:09Z")

</div>

Looks like there’s been an API change:  
This will work in 2017:  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/02cdbb2aa125c8f072d676fc5f59c4c7a1e7d387.png)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/9abdd0854fb58aa275d7b5c4b8134880327ef9d6.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 19, 2016, 7:26am UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/7 "2016-06-19T07:26:29Z")

</div>

Yes there has been API changes in 2017. Here is a complete listing of the changes:

> **[What's New in the Revit 2017 API](http://thebuildingcoder.typepad.com/blog/2016/04/whats-new-in-the-revit-2017-api.html)**
>
> Here is the online version of the 'What's New' section of the Revit 2017 API help file RevitAPI.chm included in the Revit SDK, which is also provided in the separate document Revit Platform API Changes and Additions.docx. This is very...

---

<div class="post-metadata">

**Author:** ![bbrannon4](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bbrannon4](https://forum.dynamobim.com/u/bbrannon4)\
**Post date:** [June 20, 2016, 9:35pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/8 "2016-06-20T21:35:26Z")

</div>

I should have been a little more specific. I’m using Dynamo 1.0 and Revit 2016. Here is an example of the loads not coming through correctly. I still haven;t figured out how the btu/h (in Revit) is being converted. If it was being converted to Watts, which would make sense, then it should be _26431.94 [btu/h] / 3.412 = 7746.76 [W]_. Mostly I’m trying to figure out what is happening here.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/3/315adce1225d7df3859f8b938217e221acad1be0.png)

I’ve also notices that temperatures also come through incorrectly. The results I see in Dynamo are in Kelvin, but in Revit it is set to Fahrenheit. It’s easy enough to deal with, but inconsistent since I though Dynamo was now unit-less.

I did notice that the Lunchbox node works correctly, but I’d prefer to avoid using any packages to make it easy to distribute to others in my firm. Plus it seems like an issue in the default Dynamo node that needs to be addressed.

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [June 20, 2016, 11:34pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/9 "2016-06-20T23:34:56Z")

</div>

We’ve discussed this in a few threads. Seems that length and area (and what else?) are converted to the RVT’s current unit settings in Dynamo but other units remain as Revit internal units. See [Revit API MEP Units & Conversion](https://forum.dynamobim.com/t/revit-api-mep-units-conversion/4309)

---

<div class="post-metadata">

**Author:** ![bbrannon4](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bbrannon4](https://forum.dynamobim.com/u/bbrannon4)\
**Post date:** [June 21, 2016, 4:04pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/10 "2016-06-21T16:04:44Z")

</div>

I see. Looks like most of the basic architectural units remain unit-less in Dynamo but many of the others stay as default Revit units. Any idea what’s going on with my cooling loads though? They don’t seem to be in any recognizable units.

---

<div class="post-metadata">

**Author:** ![bbrannon4](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bbrannon4](https://forum.dynamobim.com/u/bbrannon4)\
**Post date:** [June 21, 2016, 10:18pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/11 "2016-06-21T22:18:49Z")

</div>

@Kulkul, I’ve been using the Lunchbox nodes, and you’re right, the units are always correct. However, it seems to add units and then convert the whole thing to a list of strings. I’ve been trying to edit the underlying code, but I’m not aware of another function to replace “AsValueString()” that doesn’t actually pull the units. Of course I could parse the strings afterwards to remove the space and the units, but that just seems messy and excessive. Any thoughts?

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 22, 2016, 7:28pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/12 "2016-06-22T19:28:53Z")

</div>

@bbrannon4 You could have a look at the UnitUtils class and the ConvertFromInternalUnits method:

[http://revitapisearch.com/html/9cc2c0ea-f59f-9d76-ce19-ae7eede03bbd.htm](http://revitapisearch.com/html/9cc2c0ea-f59f-9d76-ce19-ae7eede03bbd.htm)

---

<div class="post-metadata">

**Author:** ![bbrannon4](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@bbrannon4](https://forum.dynamobim.com/u/bbrannon4)\
**Post date:** [June 28, 2016, 11:34pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/13 "2016-06-28T23:34:14Z")

</div>

Perfect, thanks!

---

<div class="post-metadata">

**Author:** ![c.barribaud](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@c.barribaud](https://forum.dynamobim.com/u/c.barribaud)\
**Post date:** [February 11, 2017, 9:47pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/14 "2017-02-11T21:47:50Z")

</div>

The link is dead,

Can you help me ?

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [February 11, 2017, 10:06pm UTC](https://forum.dynamobim.com/t/units-in-dynamo-1/4599/15 "2017-02-11T22:06:06Z")

</div>

Hello, @Konrad_K_Sobon is proposing a fix for this at this moment, but no responses from the developers yet. Take a look here: [https://github.com/DynamoDS/DynamoRevit/pull/1493](https://github.com/DynamoDS/DynamoRevit/pull/1493)

You can use a python script with someting like this in the mean time, here is a link to the docs: [http://www.revitapidocs.com/2017/128dd879-fea8-5d7b-1eb2-d64f87753990.htm](http://www.revitapidocs.com/2017/128dd879-fea8-5d7b-1eb2-d64f87753990.htm)  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/2/7/27543ff800e2f13cd51e03db228304361acf64f5.png)

```
import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

# Get parameter and unit type from element
element = UnwrapElement(IN[0])
parameter = element.GetParameters(IN[1])[0]
unitType = parameter.Definition.UnitType

# Get the display unit set for the unit type in the current document
formatOption = doc.GetUnits().GetFormatOptions(unitType)
displayUnit = formatOption.DisplayUnits

#Convert the value with UnitUtils
OUT = UnitUtils.ConvertFromInternalUnits(parameter.AsDouble(),displayUnit)
```
