Element Parameter not changing

I got some values for the diameter organize in a list and the pipes I want to change. When I run the script, inside revit, all the diameters get to 25 mm, even though I have values like 20 and 40

Your list structure doesn’t match. Try flattening your list of elements.

1 Like

SOLVED IT! GENIUS! (btw, what is happening then in background?)

Your list of values is just a one-dimensional list (a list of single items), but your element list is two-dimensional (a list of lists). Dynamo is trying to line up your lists when it executes a function.

Basically it sees that index 0 in your list of values is 25 and index 0 in your list of elements is a list of pipes. So it sets the value for all elements in that list. It’s assuming that the next value in your list of diameters will also have a list of pipes in the element list.

oh, ok. thanks dude :wink: