I am trying to write a small Grasshopper component that sets different permutations of slider values, and automatically records the result of each permutation, by reading it from a panel.
So, when run, the component should loop through the different possible values of each slider, record the output by reading it from the panel, and return a list with all values.
But what happens is that only the initial value is actually recorded and repeated for the number of combinations. I guess it has something to do with the solution being expired, but not recalculated, but I am not fully understanding how ExpireSolution and NewSolution work (when using NewSolution, the definition enters an endless loop and crashes).
I attached a sample definition of the system I am trying to build. The aim is to use it to compute different path possibilities for a robot arm and select the “best” one, according to given parameters.
grasshopper_looping.gh (11.1 KB)