I’m working on a Dynamo script to automate the assignment of parameter values from an Excel spreadsheet to multiple Revit family instances. The goal is to streamline data population across 20 parameters for each family type. The script works when assigning parameters one at a time, but I’m encountering issues when trying to scale this up.
Current Challenge
Parameter Mapping from Excel
I’ve structured my Excel file with the parameter names along row 2 and data listed in the cellsbelow. I have had to remove row 1 and column A as they are not required.
The script reads the Excel data and attempts to assign values using Element.SetParameterByName.
However, I’m receiving the following error: Element.SetParameterByName operation failed. No Parameter found by that name.
This results in me receiving null values out of Element.SetParameterByName.
I’ve verified that the parameter names in Excel match those in the families, but the error persists.
Technical Constraints & Capabilities
Limited to native Dynamo nodes (no external packages)*
This is part of a broader effort to automate data workflows in a sensitive environment where external packages are not permitted. I’ve previously posted about similar constraints here:
Creating and Renaming Worksets without Packages
No custom Python nodes (yet—learning in progress)
I’m currently learning Python and the Revit API to overcome these limitations and using AI as a guide—not a solution.
Revit version: 2023 Dynamo Core: 2.13.1.3887 Dynamo Revit: 2.13.1.3891
Task
The script should do the following once it is run through Dynamo Player:
Read parameter names and values from Excel
Match each parameter to the correct family instance
Assign all the parameter values at once
Key Questions
How can I iterate through all 20 parameters and assign them dynamically using native nodes? The method I have used so far only deals with a single parameter.
Is there a way to validate parameter existence before attempting to assign values to avoid the error?
What’s the best approach to structure the data in Excel for bulk parameter assignment?
Is there a native-node-friendly way to debug which parameter names are not being recognized?
Summary
Any advice or examples using native nodes would be greatly appreciated!
Thanks in advance and looking forward to hearing from you.
Hard to say without seeing what your final inputs are for setting the parameter values, but if the node says the parameter doesn’t exist then I’d check a few things right away (for all instances):
The parameter is assigned to all instances of that category.
The parameter is an instance parameter and not a type parameter.
Parameters are spelled correctly and you don’t have any leading or trailing white space.
You’re pulling all Electrical Equipment, so if you have other families in that project that don’t have the parameter assigned, yes, those family instances wouldn’t have the parameter to write to. I second Jacob’s suggestion to first identify all instance parameters. If the parameter is missing, then you’ll at least know where to identify the issue.
I have removed all the groups containing the categories indicated in my script. I ran the script again rand and it worked.
I have managed to create a list of all the categories I require. For the test I am doing all parameters are assigned to all the families I need within these categories.
The issue I am having is the data in my schedule is not looking at WIP_AssestID and assigning the data appropriately to the relevant element. The data seems to be assigned in a random order.
I am making progress though so this is good, the help is appreciated. I have included an updated screenshot below.
How is the data sorted in the excel file? How are you sorting the data in Dynamo? You have to make the connection between the excel element and the Revit one. ElementID or another unique value are usually required.
Really this should not be a ‘excel to Revit workflow, but a ‘Revit to excel and back’ as that is the only way to maintain the association. For the export make column A ks your GUID, and then column B is the previous column A and so on.
Update columns C to the end in excel.
Then in Dynamo, pull the Excel data in, and get the elements via the GUID (first item in each sublist), and set the parameter values from all the other data in each associated sublist.
Marks can also be used, but as soon as someone renumbers stuff anything which was in excel before is unusable.