It’s very strange, and frustrating. I have a break in my code, before GH_Document.NewSolution and after the new slider values are set and the current solution is expired.
At that point I can manually ask Grasshopper to recalculate, after which the code runs fine until the next iteration.
However, doing what should be the same thing in code with GH_Document.NewSolution causes the crash …
Thanks for the helpful discussion.
Is there a way to retreive float values from the number sliders? Since for example 71.80 now is returned as 7180. Thanks,
I’m trying to do something similar (optimize a set of number sliders to minimize a function defined in grasshopper) and I happened upon your discussion here. Did you ever figure this out? I’m a bit new to python but know Grasshopper fairly well, and I’d like to use python within the GH environment.
I know how to do this only in C#, and, frankly, it is a bit of an advanced topic.
Nevertheless, the information in this thread should be what you need.