Setting multiple parameters on a list of lists

Hi all,

This one has been driving me a bit crazy. I have looked extensively at the many other posts on this topic and just can’t nail it.

I’m passing elements via a list of lists (varying lengths) and trying to set two parameters on each, with values. I have tried every combo of list levels and lacing I can think of, but it just wont stick.

This attempt shows input of 6 sublists of elements, and parameter values input is also 6 sublists.

Also tried cycling the input values and flattening the input elements list, but couldn’t make that work either.

Any help greatly appreciated!

hi @simon_g,

can you provide a sample file and your dynamo script? it should be helpful if i can edit your script.


Hi @blsalvio,

Sure can. See here


hi @simon_g , please check this PopulateUniclassSs_230_v1.02.dyn (84.1 KB)


For those wondering, a simple python custom node to set the params did the job. Custom node replaced the set parameter node with list structure in my first image.

for e in zip(IN[0], IN[2]):
e[0].SetParameterByName(IN[1][0], e[1][0])
e[0].SetParameterByName(IN[1][1], e[1][1])

OUT = IN[0]

I really need to improve my Python skills!


hi actually it is not the most efficient way, I just customized it to your code it should be:

 for e in zip(IN[0], IN[2]):
     for p, v in zip(IN[1], e[1]):
         e[0].SetParameterByName(p, v)
 OUT = IN[0]

Thanks again! Appreciate the followup with improved code. I have checked and this also works well.

Hi @simon_g, the previous code is much faster than the later code because that was optimized to your needs but the later code is the general code for setting parameters for N number of parameters.