BIM World
A Professional BIM Learning Platform


Dynamo Basics Part 2: Understanding Unit Conversion

Introduction to Dynamo Fundamentals (2): Unit Conversion

Dynamo and Revit generally work well together, but there is one significant challenge: internal units are inconsistent. Simply put, all values without explicit units in Dynamo—most commonly coordinate points—are treated as being in “Revit internal units.” This can lead to confusion. For example, if you want to create two grids 10 feet apart, it might not work as expected:

Regardless of the project template or whether the unit settings are in English or Metric, such as centimeters or millimeters, the distance between the two grids will always be interpreted as 10 meters.

So, how can you ensure correct unit values? Unfortunately, there’s no shortcut—you have to manually convert units. Let’s explore how to effectively perform these conversions.

Dynamo offers several nodes for unit conversion. For instance, to convert 10 feet into metric units, you can use the following approach:

The value 3.048 represents the metric equivalent of one foot and can be directly input into Revit nodes. The node Length.FromFeet converts a raw value into feet. Meanwhile, SIUnit.Value converts any numerical value with units into meters, then strips off the units. Using these nodes, the Dynamo script that accurately creates a grid with 10-foot spacing looks like this:

To demonstrate this conversion process more practically, let’s use an example from Revit. First, use Element.GetParameterValueByName to retrieve the length of a wall:

Keep in mind that this length includes units. The units displayed in the Watch window depend on the setting found in the Dynamo menu bar under Settings > Length Display Units. Next, say you want to create a point where the wall’s length is used as the Y coordinate value:

You may encounter an error message in Dynamo. This occurs because points in Dynamo are defined in the Dynamo world coordinate system, which is unitless (although it defaults to meters when converting between units). To fix this, you must insert an SIUnit.Value conversion node in the workflow:

Only after applying this conversion will you get the correct result.

【 Related Skills Search 】

Introduction to Dynamo Fundamentals (1): Lacing

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » Dynamo Basics Part 2: Understanding Unit Conversion

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up