Parameters from Excel into Revit Family Using Dynamo


I am a fairly new user. I have created a few files that will run. I am having trouble getting another one to run. Below is what I am trying to accomplish.

I have Data in an Excel sheet that I want to import into Revit families. The data would be information like Voltage, Phase, Load, Type, Etc.

This data would have to be imported into each “Electrical Fixture” parameters, by it’s “Mark”.
Example Below:

Mark Para, Para, Para, Para, Para
FCU-1 - Voltage, Phase, Load, Type, Etc.
FCU-2 - Voltage, Phase, Load, Type, Etc.
FCU-3 - Voltage, Phase, Load, Type, Etc.
VAV-1 - Voltage, Phase, Load, Type, Etc.
VAV-2 - Voltage, Phase, Load, Type, Etc.
BLR-1 - Voltage, Phase, Load, Type, Etc.
RTU-1 - Voltage, Phase, Load, Type, Etc.
RTU-2 - Voltage, Phase, Load, Type, Etc.
RTU-3 - Voltage, Phase, Load, Type, Etc.
RTU-4 - Voltage, Phase, Load, Type, Etc.
RTU-5 - Voltage, Phase, Load, Type, Etc.
WH-1 - Voltage, Phase, Load, Type, Etc.
WH-2 - Voltage, Phase, Load, Type, Etc.
WH-3 - Voltage, Phase, Load, Type, Etc.
And so on.

Each row of information is specific to a fixture in the Revit model.

When the information is updated in the Excel file, the Dynamo file will be re-ran and overwrites previous parameter data.

What part are you having trouble with?

I am not sure.

I had previously made a .dyn file and it was kind of working. I upgraded my Dynamo to the newest release a week ago and now I am having some issues.

See below where I have tried to recreate a file. It is retrieving the data from the excel file, but the I am coming up with errors.

See images below:

Test .dyn file

thank you,

Darrin Nasalroad

You need to get rid of your headers. Your list lengths also don’t match.


I have gotten my parameters to work, but the issue I am having now is how to get the .dyn file to import the parameters into my families per the correct “Mark”.

See below callout in yellow which matches “Mark” in Family Identity parameter.


Thank you,

Darrin Nasalroad

Get the Mark for each element then use SortByKey to sort your sublists into the same order.

1 Like

Nick’s solution works well if you have the specific marks as a one-off occurrence (or know there will only be those marks). If the marks are duplicates or there are more occurrences than what excel contains I would suggest instead getting the parameter value of each elements mark, checking the index of where that occurs in the excel file (Index.Of), then using ‘get item at index’ in each other parameter sub-list in order to extract the corresponding voltage, phase and type as it relates to that instances mark.

You can also use a ‘List.Contains’ node and ‘Filter by bool mask’ to manage out any elements with marks that are present in the excel schedule if you know you may have more elements in your model once you return the excel data - I recommend this in either case, this way the script is low risk to run.

The images I posted were for simplified example only. I didn’t want to expand it until I figured the basis. The excel files will be custom for every project, meaning they may have different type of “Marks” (Ex. RTU-1, FCU-1, VAV-1, WH-1) and there will most definitely be more elements of each per type. I am wanting to create the .dyn file to recognize the “Mark” in the “Elec. Fixture” and pull the data from the excel file that is specific for that “Mark” and populate the parameter.
I have the .dyn file populating the parameters correctly, but it is picking the first element placed in the model as the first element in the excel file.

The overall goal is to bring in Data from an excel file that is created by our Mech. designers (the excel file will contain “Callouts” names, could be 100’s). The Elec. designers will then run the .dyn file extracting the data from the excel file and populating the parameters in the “Elec. Fixture” that his the same “Mark” as the excel files Callout. Hope this kind of explains our desired process.

I appreciate all of you alls help.

1 Like

Have you found a solution to your problem?

Please could you elaborate a little bit, I also faced the problem you described