Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Error: "object expired during a solution"

$
0
0

I have a Python 3 script running in Grasshopper (Rhino 8.10.24228) that sets the values of other components while running. This causes the predictable problem of expiring downstream components which results in the error window: “object expired during a solution”. In previous versions of Grasshopper, I was able to get around this problem by disabling the solver in code:

Grasshopper.Kernel.GH_Document.EnableSolutions=False

This had resolved the problem in the past, but with the latest update of Rhino I’m seeing the “object expired during a solution” errors again, even though it appears the Grasshopper solver is disabled.

Screenshot 2024-08-28 143243

Is there anything else I need to do in my scripts to edit other component values without hitting this error? Thanks for any ideas.

More background info that might be helpful…

Depending on the type of component whose value I’m setting I set values like this:

panel:
component.SetUserText(str(val))
slider:
self.component.SetSliderValue(typedVal)
curve:

component.AddVolatileData(gh.Kernel.Data.GH_Path(0), int(0), Grasshopper.Kernel.Types.GH_Curve(curveId))

Rhino:
Version 8 SR10
(8.10.24228.13001, 2024-08-15)

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles