Element.SetParameterByName don't write instance parameter

I am using the Element.SetParameterByName node to write the values of the parameters of my choice in family parameters that I have added. Observe the script in the image below:

There are 3 instance parameters, but when I run the Dynamo script, the parameter values are not written in the families. Observe the image below:

But if I click on the parameters, they are available to add them. Observe the image below:

I want these values ​​to be written in the parameters automatically, what can I do?

It seems like a list@level problem (or lacing, depending on what you are trying to achieve, but I guess it’s the former). You are trying to add 3 parameters to 15 elements, and Revit adds 6 parameters values to the first 6 elements.

You should set up levels on the list.count node before the list.ofrepeateditem. And also change level settings on the element.setparameter node.

I guess you are familiar with list@level because you are using it on the firstitem node. If you aren’t, you can read more about this in the primer:


1 Like