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.
- What is visual coding in Revit with Dynamo?
- Anatomy of a Dynamo node
- The 7 core node types explained
- Building a real-world node workflow
- Python Script nodes: beyond built-ins
- Custom nodes and community packages
- Pro tips for clean, fast graphs
- FAQ
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.
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.
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.
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 valuesLine.ByStartPointEndPoint— draw a line between two pointsNurbsCurve.ByPoints— fit a smooth curve through a list of pointsSurface.ByLoft— loft a surface through multiple curvesSolid.ByUnion / ByIntersection— boolean solid operationsGeometry.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 listList.FilterByBoolMask— split a list based on a list of true/false valuesList.Transpose— swap rows and columns in a 2D listList.GroupByKey— group elements by a shared attributeList.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.
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.
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.
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.
# 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
.Set() call outside a transaction will throw a Revit API exception and crash the run.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.
Pro tips for clean, fast graphs
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.
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.
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.
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.
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.
Frequently asked questions
Ready to start building in Dynamo?
Download Dynamo Sandbox for free and start wiring nodes today — no Revit license needed.

No comments:
Post a Comment