RhinoCommon API
RhinoAppRunMenuScript Method |
Run a Rhino menu item script. Will add the selected menu string to the MRU command menu.
Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll)

public static bool RunMenuScript( string script )
Public Shared Function RunMenuScript ( script As String ) As Boolean
Parameters
- script
- Type: SystemString
[in] script to run.
Return Value
Type: Boolean[Missing <returns> documentation for "M:Rhino.RhinoApp.RunMenuScript(System.String)"]

Exception | Condition |
---|---|
ApplicationException | If RunScript is being called while inside an event watcher. |

Rhino acts as if each character in the script string had been typed in the command prompt.
When RunScript is called from a "script runner" command, it completely runs the
script before returning. When RunScript is called outside of a command, it returns and the
script is run. This way menus and buttons can use RunScript to execute complicated functions.

Rhino for Windows
Supported in: 6.8