Friday, March 13, 2026

Dynamo Nodes in Revit: The Complete Visual Coding Reference

 


Revit + Dynamo — Visual programming guide

Dynamo Nodes in Revit: The Complete
Visual Coding Reference

A comprehensive SEO-optimized guide to every Dynamo node type — from basic inputs to Python scripting — written for BIM professionals using Autodesk Revit.

March 202515 min readDynamo · Revit · BIM · Visual Programming · Computational Design
Table of contents
  1. What is visual coding in Revit with Dynamo?
  2. Anatomy of a Dynamo node
  3. The 7 core node types explained
  4. Building a real-world node workflow
  5. Python Script nodes: beyond built-ins
  6. Custom nodes and community packages
  7. Pro tips for clean, fast graphs
  8. FAQ
01 — Introduction

What is visual coding in Revit with Dynamo?

Autodesk Dynamo is a visual programming environment that plugs directly into Revit, Civil 3D, and other Autodesk products. Instead of writing lines of code in a text editor, you drag and drop nodes onto a canvas and connect them with wires. Data flows from left to right, transforming at each step, until it drives a change in your Revit model.

This approach — called visual coding or visual scripting — lowers the barrier to automation dramatically. An architect or BIM manager with zero programming experience can build scripts that rename thousands of elements in seconds, place families along a parametric curve, or export room data to Excel automatically.

Key fact: Dynamo is open-source and ships bundled with Revit 2014 and later. No separate license is required. The standalone Dynamo Sandbox runs without Revit at all.

The fundamental unit of every Dynamo program is the node. Understanding what nodes are, how they receive and emit data, and which category to reach for in a given situation is the single most important skill in Dynamo development.


02 — Core concept

Anatomy of a Dynamo node

Every node in Dynamo has the same basic anatomy: one or more input ports on the left, an internal function, and one or more output ports on the right. You connect nodes by drawing wires from an output port to an input port.

A few key rules govern every node:

  • If an input port is not connected, the node uses its default value (or remains null).
  • Nodes execute automatically whenever any upstream input changes — there is no "run" button per node.
  • Every output can feed multiple downstream nodes simultaneously.
  • Ports with a double-chevron icon (>>) accept lists as well as single values.
Lacing: When two list inputs of different lengths meet at a node, Dynamo uses a lacing rule to pair them up. Right-click any port to switch between Shortest, Longest, and Cross Product lacing. Getting this wrong is the most common source of unexpected output in beginner graphs.

03 — Node taxonomy

The 7 core node types explained

Dynamo's library contains over 500 built-in nodes organized into seven broad categories. Each category maps to a distinct role in your graph.

Input nodes

Feed raw values into the graph. Number Slider, Integer Slider, String, Boolean, File Path, Select Model Element.

Geometry nodes

Create and transform 3D objects: points, lines, curves, surfaces, solids, meshes. Based on ProtoGeometry.

List nodes

Sort, filter, flatten, transpose, combine, and index into lists of any data type.

Math nodes

Arithmetic, trigonometry, rounding, range mapping, random numbers, and formula evaluation.

String nodes

Concatenate, split, replace, regex-match, and format text. Essential for parameter naming.

Revit nodes

Query and modify Revit elements, parameters, families, views, sheets, worksets, and model categories.

Python / custom

Embed Python 3 scripts or package a sub-graph into a reusable Custom Node (.dyf file).

Input nodes — where every graph begins

The most powerful input node for production scripts is Number.Slider combined with a defined Min / Max / Step range. This gives end users a safe, bounded control they can operate without opening the graph editor. Use Select Model Element or Select Elements by Category when the script needs to act on specific Revit objects chosen by the user at runtime.

Geometry nodes — the spatial powerhouse

Dynamo's geometry library mirrors the ProtoGeometry .NET API. The most commonly used nodes in real BIM workflows are:

  • Point.ByCoordinates — create a 3D point from X, Y, Z values
  • Line.ByStartPointEndPoint — draw a line between two points
  • NurbsCurve.ByPoints — fit a smooth curve through a list of points
  • Surface.ByLoft — loft a surface through multiple curves
  • Solid.ByUnion / ByIntersection — boolean solid operations
  • Geometry.Translate / Rotate / Scale — transform any geometry object

List nodes — the secret weapon

Most real-world Dynamo scripts operate on hundreds or thousands of elements at once. The List category is what makes that practical. Critical nodes to master:

  • List.Flatten — collapse nested lists into a single-level list
  • List.FilterByBoolMask — split a list based on a list of true/false values
  • List.Transpose — swap rows and columns in a 2D list
  • List.GroupByKey — group elements by a shared attribute
  • List.Chop — split a flat list into sub-lists of a fixed length

Revit nodes — the bridge to BIM data

Revit-specific nodes divide into two halves: query nodes that read data from the model, and action nodes that write back to it. The most important distinction is between Element.GetParameterValueByName (read) and Element.SetParameterByName (write). Never use write nodes inside a frozen branch — they will not execute and will fail silently.


04 — Hands-on example

Building a real-world node workflow

Let's walk through placing Revit family instances along a parametric grid — one of the most common Dynamo tasks in façade and structural workflows.

Workflow — parametric grid to Revit family placement
Number.Slider
Point.ByCoordinates
List.Flatten
FamilyInstance.ByPoint
Element.SetParameterByName

Step 1 — Two Number.Slider nodes control row count and column count. Adjusting either slider instantly regenerates the entire downstream result.

Step 2 — Point.ByCoordinates with Cross Product lacing generates every X/Y combination automatically, producing a 2D grid of points as a nested list.

Step 3 — List.Flatten collapses the nested list to a single level so the placement node receives a flat sequence of points.

Step 4 — FamilyInstance.ByPoint stamps one instance of a selected Revit family type at every point in the list. This single node replaces what would be hundreds of manual placements.

Step 5 — Element.SetParameterByName immediately assigns a mark number or type comment to each new instance using a formatted string from a String.Concat or Code Block node.


05 — Advanced

Python Script nodes: beyond built-ins

When no built-in node covers your use case, drop a Python Script node into the canvas. In Dynamo 2.13 and later, the default engine is CPython 3, giving you the full Python standard library plus any pip-installable package.

Inputs arrive as IN[0]IN[1], etc. Your output must be assigned to OUT. Any modification to the Revit document must be wrapped in a Transaction.

Python Script node — batch rename elements by mark
# IN[0] — list of Revit elements
# IN[1] — string prefix, e.g. "FAC-"
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import Transaction, BuiltInParameter

elements = IN[0]
prefix   = IN[1]
doc      = elements[0].Document
results  = []

with Transaction(doc, "Batch Rename") as t:
    t.Start()
    for i, el in enumerate(elements):
        new_mark = f"{prefix}{i+1:03d}"
        el.get_Parameter(
            BuiltInParameter.ELEM_MARK_PARAM
        ).Set(new_mark)
        results.append(new_mark)
    t.Commit()

OUT = results
Always use a Transaction. Built-in Revit nodes manage transactions internally. Python Script nodes do not — any .Set() call outside a transaction will throw a Revit API exception and crash the run.

06 — Ecosystem

Custom nodes and community packages

Once you have a useful sub-graph, select all relevant nodes, right-click, and choose Create Custom Node. This collapses your logic into a single .dyf file that appears in your library and can be shared across projects. For team-wide distribution, publish it to the Dynamo Package Manager.

Clockwork
800+ additional nodes filling gaps in the standard library, especially strong for Revit element queries and parameter handling.
springs nodes
Hundreds of utility nodes for list management, UI controls, string formatting, and model data export.
Data-Shapes
Build custom UI dialogs — dropdowns, checkboxes, multi-select lists — without writing a single line of Python.
MEPover
Specialised nodes for MEP workflows: duct routing, cable tray sizing, connector management, and system analysis.
Rhythm
A broad utility package with nodes for Revit, Rhino interop, and everyday list/math operations that are missing from core.
BimorphNodes
High-performance nodes for large-scale element selection, parameter batch operations, and schedule manipulation.

07 — Best practices

Pro tips for clean, fast graphs

01
Group and color-code everything

Select related nodes and press Ctrl+G to group them. Assign consistent colors: yellow for inputs, green for Revit actions, blue for geometry, red for outputs. Anyone reading your graph understands it in seconds.

02
Prefer list operations over Python loops

Dynamo processes lists natively via replication. A single Element.SetParameterByName handles 10,000 elements without a loop. Use Python only for logic that genuinely needs imperative control flow.

03
Freeze slow branches

Right-click any node and select Freeze to prevent it re-running on every change. Freeze expensive Revit document queries that only need to run once, then unfreeze only when you need a fresh result.

04
Use Code Block nodes for compact math

Instead of chaining five Math nodes, a single Code Block expresses the same thing in one line: width / 2 + offset * Math.Sin(angle);. Code Blocks support DesignScript and are far more readable for expressions.

05
Always test on a copy of the model

Dynamo write operations are undoable inside a single Revit session, but they cannot be rolled back after saving. Always run destructive scripts on a detached copy until you are confident in the output.


08 — FAQ

Frequently asked questions

What version of Python does Dynamo use?
Dynamo 2.13 and later defaults to CPython 3.9+, giving you access to the full standard library. Older versions use IronPython 2.7. You can switch engines per Python Script node in its settings panel.
Can I run Dynamo without a Revit license?
Yes. Dynamo Sandbox runs completely standalone, giving you access to all geometry, math, list, and string nodes. Revit-specific nodes require an active Revit connection and are disabled in Sandbox mode.
What is lacing and why does it matter?
Lacing controls how Dynamo pairs list items when two lists of different lengths enter the same node. Shortest stops at the shorter list; Longest repeats the final item; Cross Product generates every possible combination. Wrong lacing is the number-one cause of unexpected output in Dynamo graphs.
How do I share a Dynamo script with my team?
Share the .dyn file (the main graph). If the graph depends on Custom Nodes, also share the .dyf files or instruct teammates to install the same packages from the Package Manager. Document the Dynamo version and package versions the script was built with.
Is Dynamo free?
Yes. Dynamo is fully open-source (GitHub: DynamoDS/Dynamo) and ships bundled with Revit. The standalone Dynamo Sandbox is also free. There is no separate subscription or seat license for Dynamo itself.
What is the difference between a node and a Code Block?
A node is a pre-built function with a fixed number of input and output ports. A Code Block is a free-form DesignScript editor that lets you write multi-line logic, define variables, and call node functions by name — all inside a single canvas element. Code Blocks are ideal for compact math and string formatting.
#Dynamo#DynamoNodes#Revit#BIM#VisualProgramming#ParametricDesign#AutodeskDynamo#ComputationalDesign#DynamoBIM#VisualCoding#RevitAutomation

Ready to start building in Dynamo?

Download Dynamo Sandbox for free and start wiring nodes today — no Revit license needed.


No comments: