Prevent disabling of solver

Hi I was wondering if there is a ghpython script that prevents disabling of solver in grasshopper. I have a ghpython code that prevent certain things from being done and the only way people can bypass this is disabling of the grasshopper solver itself. Any help is appreciated!

I’m not sure that is possible. What is the problem you’re trying to solve with not allowing the solver to be disabled?

Thanks for your response. I have a simulation software within grasshopper and couple of components are blocking users from doing certain actions. The current one way of bypassing it is by locking the solver itself. I was wondering if there was way to prevent that or maybe allowing certain components to still compute even with the solver disabled.

I found this through searching GH_RhinoScriptInterface.RunSolver Method. Do you think there is a way I might be able to re-enable the solver when its locked potentially using this?

It won’t put the solver back on, but it will run the solver once.

do you think there is a way to run this code to run the solver once when the file is opened even if the opening of the file is done with the solver locked? So use it as a way to compute the file at least once regardless if the solver is locked or not when opening the file?

TBH I don’t know. I suggest you try and find out

Luckily this is (very likely) not doable from within a script component, otherwise I would not download a single .gh file from this forum anymore! I always lock the solver and scan the .gh script for hidden code. And I can only warn everyone to install plugins blindly. I’m not sure if McNeel is doing enough to scan plugins for malware…

Yes now you mention it to me it makes sense why it’s set like that and indeed it’s would be scary. I’ll probably give up on this part. Thank you all for your inputs.