M_Rhino_RhinoApp_RunScript - mcneel/rhinocommon-api-docs GitHub Wiki

RhinoApp.RunScript Method (String, Boolean)

Runs a Rhino command script.

Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public static bool RunScript(
	string script,
	bool echo
)

VB

Public Shared Function RunScript ( 
	script As String,
	echo As Boolean
) As Boolean

Parameters

 

script
Type: System.String
[in] script to run.
echo
Type: System.Boolean
Controls how the script is echoed in the command output window. false = silent - nothing is echoed. true = verbatim - the script is echoed literally.

Return Value

Type: Boolean
[Missing documentation for "M:Rhino.RhinoApp.RunScript(System.String,System.Boolean)"]

Exceptions

 

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

Remarks

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.

Version Information

Supported in: 5D58w

See Also

Reference

RhinoApp Class
RunScript Overload
Rhino Namespace

⚠️ **GitHub.com Fallback** ⚠️