Element.SetParameterByName Not working with lists as input

I’m trying to use the node “Element.SetParameterByName” with two lists, but whenever I run the script it only works with the first Item of each list. Both lists count the same number of items and each list is placed for one of the inputs (parameterName and value). I have tried all the options for lacing and even flattening (something that I can’t flatten anymore).

It may be a basic question, but I’d appreciate it if someone could give me a hand with this.

It’s always helpful to show all the inputs for a node you’re having trouble with. I’d guess this is a list structure issue. Your element list is probably a list of lists. Either way, you’ll need to use list levels (element@L1) to ensure that all elements in the list get supplied the whole list of parameters/values.

2 Likes

Click on the little arrows besides the input labels and explore Levels

While your parameter name and value list lengths match, you most probably are feeding one element

1 Like

Hi @Nick_Boyts and @Vikram_Subbaiah, thanks for your help! It’s working now (both answers helped me a lot).

1 Like

I´m having the same problem, but it`s still not working for me.

Do you know what is going on?!

I have tried this as well:

But it is still not Working.

You have your inputs all wrong, need to provide a list of elements, not integers
The same is indicated in the error message.
Your other two inputs are probably wrong too
.
Once you have that sorted, if you need levels to be manipulated, there are multiple variations you could attempt. All don’t have to be activated and they can be something other than @L1. However your issue, at present, has got nothing to do with levels.

Please also start a fresh topic if you still have issues as this one is closed

1 Like

Thank you very much for your response. In fact, I’m just starting to explore this tool and I don’t really understand much of this language, so I assumed that my issue was the same as this one.

In fact, what I’m trying to do is to filter my Revit model twice, first by category and then by a parameter value. But I don’t know how to apply this double filter in order to obtain a list of elements. Anyway, I’m pretty sure that my other 2 inputs are correct cuz I’ve tried them before with an actual List of elements (and without the Levels applied) Thank you once again for your help.

1 Like