Hi all,
I’m trying to use the Element.SetParameterByName node with the following three lists:
- the first list with the elements (walls in my case), this is a one-dimensional list;
- the list with parameters: each element gets its own list of parameters, so this is a two-dimensional list;
- a list with the values to set: each element also gets its own list of values to set, so this is also a two-dimensional list.
list one (elements): [0] element 1 [1] element 2 etc. list two (parameters): [0] List: [0] parameter 1 [1] parameter 2 etc. [1] List: [0] parameter 1 [1] parameter 2 etc. etc. list thee (values): [0] List: [0] value 1 [1] value 2 etc. [1] List: [0] value 1 [1] value 2 etc. etc.The image attached might also clarify. In this image it doesn't look like the parameter names nor values vary, but this will have to be possible. That's why I chose to define those parameter names and values for every element in the first case.
How would I go about setting these parameters to the elements, because the Element.SetParameterByName node doen’t take 3 lists. I’ve tried different lacings, transposing lists, making a for loop in a code block (which I failed at), making a Python script with a for loop (which didn’t work as expected). Can anyone help me with this?
As I said I tried using a for loop in a code block, but it says the variables aren’t yet defined which I don’t understand. An image of this code including the error is attached.
Thanks in advance.
Marc