HELP! Set project parameters from Excel File

Hello, I’m having a hard time trying to set multiple project parameters from an excel spreadsheet. I was able to get one of the parameter to set from the excel spreadsheet but I don’t know how to push to the rest of my project parameter list.

  1. I created a get parameter and also created a list.
  2. I created a file path to excel and create a list and i wanted to return whats in the list and set to my project parameters. I just dont know how to use 2 list to sort and setparameterbyname.

Attached is my Dynamo project.
Revit 2018.3
Dynamo and Set Parameters Fabrication Assembly2.dyn (62.3 KB)
Get and Set Parameters Fabrication Assembly2.dyn (62.3 KB)
Get and Set Parameters Fabrication Assembly2.dyn (62.3 KB)

You will have to do this for every parameter you want to set:

1 Like

Look into list lacing and levels as you can leverage a single Element.SetParameterValueByName node for all of the elements, parameters, and values.


Next question is how can I break up the excel list to only show me the name/number i need to push to the set parameter? The 12 “Get Parameters” coincide with the 0-11 excel list shown in the List.GetItemAtIndex.

Is there anyway you can show me an example. Thank you in advance.


This is a way to set multiple parameters.
Your excel file probably looks a bit like the code block i presume.

If you only want to use certain parameters from your excel file, i suggest adding these nodes:

Hope this helps!

1 Like

So I created these parameters in Revit and want to extract and set everything in row 2.
example: Job Control Number : 25703101
Job Number : 17-00853
Job Name : HILTON
Shop Drawing : SO

Row 2 will vary from job to job.

I think that’s what my graph does :wink:

Just hook up the Data.ImportCSV node (or any equivalent) where i created my list and it should work fine. Let me know if you have any troubles.

Home4.dyn (18.2 KB)

Oh wait, do you want to change the parameters in your revit file? Or you want to change the excel file?

Im wanting to read excel row 2 and return and set to the revit parameters i created. So yes write back to revit parameters from excel.

Okay in your specific situation if you want to set the parameters in Revit From your excel file, this should do the trick:

I personally don’t have acces to excel right now, so i put it in a text file saved as csv

Home4.dyn (14.2 KB)

I got this error.
Warning: Element.SetParameterByName operation failed.
The parameter’s storage type is not a number.


Never mind I think I got it working. Let me do more testing.

it works perfect and insert all the correct information to all the parameters if you select model element one by one, now I changed it to search Element Type “AssemblyInstance” - All Elements of Type and and it does find all the assemblies but when i select some assemblies are missing information from the set parameters. Thank you again for all the help. I also tried to use Select Model Elements but it doesnt let me select assemblies only individual parts.

Happy to help!
Try to play a bit with these for multiple elements:

1 Like

Sorry one last thing, I can now select all assemblies using Element types “AssemblyInstance” All Elements of Type, issue is when i hide an assembly in 3d view it still pushes the parameters into it even if its hidden.