I’m trying to introduce multiple parameters to one instance family. As I show in the image below it is working, but I would like to optimice the code with a loop or similar, as for each node the only thing changing is the index i am taking from each list. For the moment there are just 9 parameters now, so it is not much work, but I would like to increase significantly the number of parameters to introduce and that would help.
They are caused by custom packages using the same namespace as the OOTB ones if written as a single line in a code block it will list the possibilities in the error
fyi I moved the solution to @mellouze as he solved the initial topic problem
I am just a bit confused about the return of for loop, I don’t know any python or javascript.
Anyway, I did a 2 dimension loop, The logic seems ok. And it’s somehow fonctionnal, even though very very very long.
I agree that it is a bit confusing at first, but that’s how DesignScript works. It allows you to store values computed in the imperative block outside of said block.
It is indeed long because that is in no way an optimised way of achieving this specific goal, rather an “ad hoc” solution… There must be a better thing to do, maybe through Python, using a custom node, using specific lacing, etc.