加上这句就行了
Grasshopper.Kernel.GH_Document.EnableSolutions=False
也可以直接调用命令。
gr = Grasshopper.Plugin.GH_RhinoScriptInterface() gr.DisableSolver()