DYNAMO NOTES – CHAPTER 4 (EXPANDED EDITION)
============================================
Chapter 4: Working with Revit Elements — Selection, Filtering, and Parameters
INTRODUCTION
Chapter 4 marks a major milestone: transitioning from pure Dynamo logic to interacting with real
Revit models. This chapter explains how Dynamo sees Revit elements, how they are selected, how
they are filtered, and how parameters are read and modified. Mastering this chapter is essential for
automation workflows.
SECTION 1: HOW DYNAMO INTERACTS WITH REVIT
Dynamo communicates with Revit through the Revit API (Application Programming Interface). Each
Revit element—walls, doors, floors, rooms—is represented in Dynamo as a reference object.
Dynamo can:
• Read an element’s properties
• Modify parameter values
• Filter and organize collections of elements
• Create, delete, or transform elements (carefully!)
This chapter focuses on reading and modifying elements safely.
SECTION 2: SELECTING ELEMENTS
Selecting elements is the first step in working with data inside a Revit project.
Two types of selection:
1. Manual Selection
• Select Model Element
• Select Model Elements
• Useful for one-time scripts or testing.
2. Category-Based Selection
• Categories
• All Elements of Category
• Element Types
Category-Based selection is the foundation for automation. Examples:
• All walls
• All doors
• All levels
• All views
• All title blocks
SECTION 3: FILTERING ELEMENTS USING NODE LOGIC
Not every selected element is relevant. Dynamo provides several filtering strategies:
1. Filter by Category
Example: Filter all “Walls” from a mixed list.
2. Filter by Type
Example: Filter only "Basic Wall" types.
3. Filter by Parameter
Example: Filter rooms by area > 20 sqm.
Useful nodes:
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
SECTION 4: ELEMENT IDENTITIES AND THE API
Each element has:
• A UniqueId — permanent
• An ElementId — project-specific
UniqueIds are used for long-term tracking or coordination tasks.
SECTION 5: READING PARAMETERS
Every Revit element contains parameters that define its properties:
• Dimensions
• Materials
• Mark values
• Fire ratings
• System assignments
• Level association
Dynamo retrieves a parameter value using:
[Link]
Types of parameters:
• Text
• Number
• Integer
• Length
• Area
• Boolean
• ElementId
SECTION 6: WRITING PARAMETERS
Modifying parameters is a core Dynamo capability.
Use:
[Link]
Examples:
• Change all door marks
• Update room names
• Set fire rating values
• Write comments
• Correct inconsistent data
Important:
Some parameters are read-only and cannot be modified.
SECTION 7: COMMON PARAMETER CHALLENGES
Typical issues when writing data:
• Null values
• Wrong data type
• Read-only parameters
• Missing parameters in a family
• Type vs. Instance confusion
SECTION 8: FILTERING WORKFLOWS — REAL-WORLD EXAMPLES
Workflow 1: Filter Doors by Level
Steps:
• Select all doors
• Get "Level" parameter
• Compare with target level
• Filter with Boolean mask
Workflow 2: Find Rooms Missing Names
Steps:
• Select all rooms
• Read "Name" parameter
• Check for empty strings
• Filter out incomplete rooms
Workflow 3: Identify Incorrect Wall Types
Steps:
• Select all walls
• Extract Type Names
• Compare with standard list
• Output mismatched types
SECTION 9: ELEMENT GEOMETRY (BASIC INTRO)
Dynamo can extract geometry from Revit elements:
• Solids
• Faces
• Curves
• Points
This is essential for:
• Clash checks
• Spatial analysis
• Geometry-based automation
SECTION 10: BEST PRACTICES FOR ELEMENT HANDLING
1. Always work in Manual mode
2. Use Watch nodes frequently
3. Group nodes logically
4. Use [Link] to remove nulls
5. Avoid modifying thousands of elements at once without testing
6. Copy your model before running heavy scripts
CONCLUSION OF CHAPTER 4
This chapter introduced the essentials of working with Revit elements: selecting, filtering, reading
parameters, writing parameters, and understanding the underlying Revit API structure. These
foundational skills prepare you for more advanced automation workflows, including element
creation, geometry automation, and batch parameter operations.
End of Expanded Chapter 4.