In Grasshopper, it’s possible to send commands directly from Grasshopper to Rhino. How? By using the C# component.
Simply add the following line to your C# code.
Rhino.RhinoApp.RunScript(string script, bool echo); //script: The command to send //echo: Set to true for the command to appear in Rhino's command prompt
For example, if I want to automatically save the Rhino document, I could add the following to a C# component:
Rhino.RhinoApp.RunScript("Save", true);
For more complex commands, we can use some special syntax. For example, if I want to save the file with a custom filename, I can use:
Rhino.RhinoApp.RunScript("_-Save test3.3dm", true);
The hyphen allows us to modify parameters, and the underscore allows us to enter more than one command at once without Rhino waiting for manual user input.
More information
The full list of Rhino commands is available here.
For more detail about using the RunScript method, read this.
Hi there. Just wanted to let you know that your last link re: the RunScript method is broken and should point to
http://developer.rhino3d.com/guides/rhinocommon/run-rhino-command-from-plugin/
Cheers