Changing Sliders and recording result data with Python

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. (11.1 KB)

is this what you wanna do? (8.5 KB)

No, what I want to do is to be able to set from the Python component all the combinations of values of the two sliders, let Grasshopper compute the sum (which would be a much larger definition in reality), and record all the sum results from the text panel.
What I cannot understand is how to trigger a recompute of the result in the text panel, so to be able to read it, without triggering the recompute of the whole document, which crashes Rhino…

Why do you want to compute the panel?

I mean you should get the result from the SUM component and not the panel

On the other hand I think Sticky could be useful here to save the results

The panel was just to make an easier workflow, as in the real definition there will be several same components, and so having a panel to store the value to be recorded seemed to be a better solution.
In any case, the problem is the same (already tried with sticky too), that the sliders are updated by the script, but the final value is not actually re-computed till the end of the loop, and so all values in the list are the same…

Hi there,

Did you found a solution to your problem ? I am looking for this exact same result