Hi,
I’m trying to collect a series of screenshots of a model with varying parameters using Rhino and Grasshopper. Essentially, the flow of the script I’m trying to create is:
for param in parameters
set model to have param
run solver on the model
take screenshot of model
I am running into trouble with running the solver, as it runs only once even after running through the entire loop. I’ve also enclosed my script in the bottom
I’ve searched online and I found one video that does exactly what I want (it’s able to run solver at each loop iteration), but the tutorial is in an old version of Rhino (I think Rhino 6 or 7?) and no longer works for Rhino 8. Here is the video (timestamp 5:00) and the code snippet I am referring to:
I’m wondering what I need to change/do in order to acheive results similar to the video? Thanks
Rhino.py (1.1 KB)
200326_ZoomSelected_GHPython_00.gh (14.5 KB)
UPDATE:
I ran the debugger and the model does seem to be re-rendered only when I step through the debugger. But I’d like to visibly see the model getting re-rendered with the click of a button, similar to what the video demonstrates. I tried adding time.sleep() around runSolver() but that doesn’t seem to help. Would appreciate any help. Thanks!