I would like to batch-run a number of simulations within Grasshopper. More specifically, I would like to: (a) automate a bunch of sliders, whose input values are fed directly from a CSV file, and (b) store the corresponding simulation output/s for each simulation run.
I have written a Python script in Rhino Python Editor that does the above and works like a charm. Now, my scope is to implement the same within a GH Python component where a user may indicate the sliders (to be automated) and simulation outputs (to be stored), by simply plugging both as inputs of the GH Python component. The batch simulation would then be activated via a boolean toggle.
When implementing the above logic within a GH Python component, I ran into the following problems:
The component seems to end up in a recursive loop
The values stored in the simulation output components (‘deflection’ and ‘weight’) seem to reflect only the last generated values (refer to attached image).
After reading other forum posts, I am aware of the issue with calling a new solution within another solution, however still feel uncertain about the way forward (especially since most posts discuss approaches in terms of C# not Python).
I would appreciate any form of help