Setting Parameters for Many Elements at Once

I’m trying to import any given schedule from Excel (that was originally exported from Revit) and use it to update parameters in Revit. I have everything working up to feeding information into into the Element.SetParameterByName node all the info at once (I can arbitrarily set it to update only the parameters of the first element and that works).

Now, I would like to take, for example, 19 elements that have been collected in a list with 8 collected parameters in a list, and update those based on a 19x8 list that was pulled in from Excel. Should I be able to simply wire my inputs to the node and expect the correct output, meaning the formatting of my inputs is incorrect? Or, is there an additional amount of list logic that is required?

Thanks and I’m happy to provide any additional info if that is required to answer, the only reason I didn’t include a picture is that there are a mess of nodes before this point unrelated to this specific question.


I would recommed using the search button on top right of your screen, there are a lot of questions on this forum about transferring data to and from excel. Most of them have a tick mark that marks a solution is there.
The key to these problems is how to get the updated data to the same elements that provided the data in the first place in excel. There you will need an unique key that element has, for a room by example, it would be the number, since thats unique. for all other elements its best to use the unique Id as key. If you are working with a workshared file in a team, the Id’s of the elements can change, but not the UniqueId.

Right, numerous searches along the way got me to the point where I have all the data.

Now the problem might be more of a list logic problem, where I have a 19x8 (for example) list of elements by parameters that I would like to assign to 19 elements with 8 corresponding parameters and I’m not getting the outputs I’m expecting.

This might help, if not, post your .dyn so we can see

.dyn file here. I didn’t upload the logo I used, but I can’t imagine that would break anything.

The code blocks outside of groups were added just to force it to consider only the first element of the list (which makes it work). But again, the idea is to automate the process for any amount of elements.

I transposed the data from Excel, where I believe I didn’t need to, fixed that, and now get the error message:

Warning: One or more of the input types are not matching. Couldn’t find a version of SetParameterByName that takes arguments of type (__array,Function,__array)

So likely my problem is that SetParameterByName doesn’t accept arrays and I need to use some other combination of loops, Python, or package node I haven’t found yet.

i think this happens when the data fron excel is interpreted as being text thats been sent to a parameter that thakes numbers only, can you check? the object.identity node can give you a clue.
There might be some other guru’s here that can give you a hint