Close Grasshopper window from SDK / Automation

Hello,

I know that you can open Grasshopper from the RhinoScript COM object using, for instance, something like:
rhinoApp.RunScript("-Grasshopper", 0);

But… How does one close then the open Grasshopper window using the SDK functions?

It could either be using the RhinoScript COM object (say, sending a Rhino command) or using the Grasshopper Plugin COM interface methods: https://developer.rhino3d.com/api/grasshopper/html/Methods_T_Grasshopper_Plugin_GH_RhinoScriptInterface.htm

Thank you very much for your assistance.

Hi @scudelari,

How about this?

rhinoApp.RunScript("_-Grasshopper _Window _Hide _Enter", 0)

– Dale

Hi Dale!

Thank you for the reply and I apologize for taking long to reply to you.

Won’t this command only hide the window - and not really close it?

If you were just using Grasshopper, what would you do to close it?

– Dale