I am trying to change number slider attributes from within a python script. Based on what I understood, ExpireSolution(True) and ExpireSolution(False) expire the component, with ExpireSolution(True)
running a new solution afterward. However, It is only when I use ExpireSolution(False) during a solution that I get an error “Object expired during a solution”. ExpireSolution(True) works fine under the same condition.
why am I not getting the same error with ExpireSolution(True) ???
ExpireSolution.gh (7.3 KB)
true value starts a new solution, so now you’re running a solution inside another solution. The inner solution solves the object so when the outer solution is allowed to continue, the object is no longer expired.
It’s not good news though, running nested solutions can lead to all sorts of weird side effects.
Thanks for the explanation and the example.
Just a simple question.
Running NewSolution(True) from within a solution should cause Grasshopper to enter an infinite loop and crash Rhino. However, When I try NewSolution(True) in ghpython, nothing happens.
Why Rhino is not crashing?