Lock/unlock grasshopper solver

Probably a noob question…

I built a small interface with RCP, but GRASSHOPPER slows rhino down a lot, So I think of a button that executes RunPythonScript(…) that locks/unlocks the solver.

I believe the script will somehow look like this:
if IsSolverEnabled():
DisableSolver()
else:
EnableSolver()

I already found the DisableSolver method here:

How do I call this inside the python script? I don’t get the right import…

Thank You!

You may not be interested in another way to do this. Just in case… you could also set a shortcut to disable / enable the solver.

Hello Martin,

this is my current way of doing it, but the GH window is closed (RCP!) and it would be more comfortable to just click a button.

1 Like

Another option, you could create a macro in Rhino and put that into a button.

image

2 Likes

There was also this thread a few days ago that uses a different property :

2 Likes

@martinsiegrist
perfect, thank You!!

but I am still curious how to get the correct “path” to access a method like above…

1 Like