If you've started using Revit Dynamo to reduce repetitive tasks, understanding the flow of data is your first step. Today, we’ll break down the core concepts of 'Get' (Read) and 'Set' (Write) nodes—the heart of any Dynamo workflow.
Q: What is the difference between Get and Set in Dynamo?
A: To put it simply, Get is for reading data from Revit, and Set is for writing data back into Revit.
Get: Retrieves information such as element names, heights, or parameter values into the Dynamo workspace.
Set: Applies processed or new data from Dynamo back into the actual Revit model.
1. Get (Reading Data): Extracting Info from Revit
Every Dynamo workflow begins with data extraction. Here are the three most frequently used nodes for "Getting" data:
Element.GetParameterValueByName: The most versatile node. It reads specific parameters (e.g., Comments, Mark, Level) by entering the parameter name as a String.
Element.Name: Use this to quickly identify the name of a selected element.
FamilyInstance.GetLocation: Essential for extracting coordinates or location lines, often used as base data for placement automation.
2. Set (Writing Data): Updating the Revit Model
Once you have processed your data, it's time to push it back into Revit.
Element.SetParameterByName: Think of this as the "Finish Line" of your script. It injects new values into a specific parameter of an element.
Input: Target Element, Parameter Name, and the New Value.
Result: The moment this node runs, the Revit model is physically updated.
3. Expert Tips to Avoid Common Dynamo Errors
To ensure your script runs smoothly, keep these three professional tips in mind:
① Match the Data Type
The data type you "Get" must match the type you "Set."
String: Mark, Comments, Type Name, etc.
Double / Number: Height, Length, Offsets, etc.
Pro Tip: Use the
String from Objectnode if you need to convert numbers into text for a parameter.
② Case Sensitivity & Spacing
The parameterName must be an exact match to what is shown in Revit. "Comments" and "comments" (lowercase) are recognized as different, which will cause your script to fail.
③ Read-Only Parameters
Some parameters, like 'Area' or 'Volume' of a wall, are automatically calculated by Revit. You can Get these values, but you cannot Set them. Always check if a parameter is editable before trying to overwrite it.
4. Standard BIM Automation Workflow
Select Model Elements: Pick the objects in Revit you want to modify.
Element.GetParameterValueByName: Read the existing data.
Data Processing: Use nodes like
String.ReplaceorMathto modify the data.Element.SetParameterByName: Write the final values back into the Revit element.
💡 A Note from Kai Dynamo is ultimately a game of "What data to Get, how to manipulate it, and where to Set it." Mastering this flow is the key to automating 80% of your BIM manual tasks.
I hope this guide helps you boost your efficiency in Revit!
Search Keywords (Tags): #Revit #Dynamo #BIM #Automation #GetParameter #SetParameter #VisualProgramming #BIMManager #DynamoNodes

No comments:
Post a Comment