How to append menu to grasshopper editor window?

I wonder how to append menu or menu entry to GH main editor window, following ‘File,’ ‘Edit’, … as I want to add a feature like “Export” or “Save into Rhino file”, which better stays in the menu.

There seem to be no documented ways to do that. And I’m developing a plugin, not in scripting component.

There’s no api for this, but it can be done. Once you are certain the Grasshopper.Instances.DocumentEditor has been constructed and loaded (it will not be if your plugin is loaded during startup, you have to check again later), you will need to iterate over all controls on that form, find the main menu and insert your menu items.

2 Likes