📘 Dynamo Basics Guide
▾
What is Dynamo?
Dynamo is an open-source visual programming environment that extends Autodesk Revit with algorithmic design and automation. You connect nodes on a canvas — each node performs one operation — to build scripts that automate repetitive tasks, generate geometry, extract data, and control Revit models without writing traditional code. Dynamo runs either inside Revit (Dynamo for Revit) or as a standalone sandbox application.
Node Types
- Input nodes — Number sliders, string inputs, boolean toggles, file path pickers. These are where data enters your graph.
- Action nodes — Perform operations: filter lists, query Revit elements, run math, call Revit API methods. The bulk of every script.
- Output nodes — Watch nodes show results; Transaction nodes write changes back to Revit (wrapped automatically by Element.SetParameterByName, etc.).
Python Script Node
- Insert via Add → Core → Scripting → Python Script
- Inputs arrive as
IN[0],IN[1], …; your result goes intoOUT - Import Revit API:
import clr; clr.AddReference('RevitAPI'); from Autodesk.Revit.DB import * - Access the document with
doc = DocumentManager.Instance.CurrentDBDocument - Wrap writes in
TransactionManager.Instance.EnsureInTransaction(doc)/ForceCloseTransaction() - Use IronPython 2.7 syntax (CPython 3 available in Dynamo 2.13+ via CPython3 node)
Recommended Packages
Install via Dynamo → Packages → Search for Packages:
Data-Shapes
BimorphNodes
Rhythm
Clockwork
archi-lab
Genius Loci
Recommended Workflow
- Start with Dynamo's built-in nodes — cover 80% of use cases without Python
- Use Element.GetParameterValueByName before writing a Python collector
- Always test on a non-production model or a linked copy
- Add Watch nodes at every stage to debug list levels (use @1 lacing for nested lists)
- Switch to Python only when built-in nodes can't access a Revit API class or you need loops with complex logic
- Save graphs as
.dynfiles in a shared folder — commit them to Git for version control
List Levels & Lacing
- Dynamo stores data in nested lists — understanding @L1, @L2 levels prevents mis-matched connections
- Shortest lacing: zip lists by shortest — safest default
- Longest lacing: repeats last item to fill — useful for single-value broadcasts
- Cross Product: all combinations — powerful but creates large lists
- Right-click a node input to set lacing; use List.Map and List.Flatten to manipulate structure