Use scripting
Scripting extends Rhino functionality.
All Rhino commands can be used in command macros. Command macros can be run by typing the command at the command prompt, from toolbar buttons, shortcut keys, command aliases, from the ReadCommandFile command, or using the Paste command into Rhino's command stream.
Some commands are provided to facilitate scripting actions usually performed through the Rhino interface.
Specialized commands for scripting
Action
![](../image/command_icons/cancel.png)
Cancel
Cancel the current command and deselects objects.
![](../image/command_icons/_no_toolbar_button.png)
Delete
Removes objects or sub-objects.
![](../image/command_icons/_no_toolbar_button.png)
Echo
Turn on echoing of script commands to the command history window.
![](../image/command_icons/editpythonscript.png)
EditPythonScript
Edit a Python script.
![](../image/command_icons/scripteditor_rt.png)
EditScript
Open a text editor utility for editing RhinoScript files.
![](../image/command_icons/_no_toolbar_button.png)
Enter
Simulate the Enter key in a script.
![](../image/command_icons/_no_toolbar_button.png)
EnterEnd
Simulate the Enter key to complete a command string in a script.
![](../image/command_icons/_no_toolbar_button.png)
GetDocumentUserText
Retrieve text information attached to a file with the SetDocumentUserText command.
![](../image/command_icons/_no_toolbar_button.png)
GetUserText
Retrieve text information attached to an object using the SetUserText command.
![](../image/command_icons/macroeditor.png)
MacroEditor
Open an edit window for script creation and testing.
![](../image/command_icons/_no_toolbar_button.png)
NoEcho
Turn off echoing of script commands to the command history window.
![](../image/command_icons/_no_toolbar_button.png)
Pause
Stop a script for user input.
![](../image/command_icons/readcommandfile.png)
ReadCommandFile
Read and execute a command script from a text file.
![](../image/command_icons/_no_toolbar_button.png)
Run
Run another application from inside Rhino.
![](../image/command_icons/_no_toolbar_button.png)
RunPythonScript
Run a Python script.
![](../image/command_icons/_no_toolbar_button.png)
RunScript
Run a RhinoScript.
![](../image/command_icons/_no_toolbar_button.png)
SetCurrentRenderPlugIn
Specify a rendering plug-in.
![](../image/command_icons/_no_toolbar_button.png)
SetDisplayMode
Specify a viewport display mode.
![](../image/command_icons/_no_toolbar_button.png)
SetDocumentUserText
Attach text information to the file.
![](../image/command_icons/_no_toolbar_button.png)
SetObjectName
Assign a name to an object.
![](../image/command_icons/setredrawoff.png)
SetRedrawOff
Disable screen redraw, construction plane, and view changes during scripts.
![](../image/command_icons/setredrawon_rt.png)
SetRedrawOn
Enable screen redraw, construction plane, and view changes during scripts.
![](../image/command_icons/_no_toolbar_button.png)
SetUserText
Attach text information to an object.
![](../image/command_icons/setworkingfolder.png)
SetWorkingFolder
Specify the default folder for saving and opening files.
Interface
![](../image/command_icons/_no_toolbar_button.png)
BringViewportToTop
Bring a viewport to the front.
![](../image/command_icons/clearundo.png)
ClearUndo
Clear the undo buffer to free memory.
![](../image/command_icons/_no_toolbar_button.png)
CloseRenderWindow
Close the render display window.
![](../image/command_icons/closeviewport_newviewport_rt.png)
CloseViewport
Close the active viewport.
![](../image/command_icons/_no_toolbar_button.png)
CommandPrompt
Manage the display of the command prompt window.
![](../image/command_icons/_no_toolbar_button.png)
CopyRenderWindowToClipboard
Copy the image in the render window to the Clipboard.
![](../image/command_icons/_no_toolbar_button.png)
DocumentPropertiesPage
Open the Document Properties dialog box at the specified page.
![](../image/command_icons/_no_toolbar_button.png)
Exit
Close Rhino.
![](../image/command_icons/_no_toolbar_button.png)
Maximize
Maximize the Rhino application window.
![](../image/command_icons/maxviewport.png)
MaxViewport
Maximize the active viewport.
![](../image/command_icons/newfloatingviewport.png)
NewFloatingViewport
Create a new free-floating viewport.
![](../image/command_icons/newviewport.png)
NewViewport
Create a new viewport.
![](../image/command_icons/_no_toolbar_button.png)
NextOrthoViewport
Activate the next viewport with an orthogonal projection.
![](../image/command_icons/_no_toolbar_button.png)
NextPerspectiveViewport
Activate the next viewport with a perspective projection.
![](../image/command_icons/_no_toolbar_button.png)
NextViewport
Activate the next viewport.
![](../image/command_icons/_no_toolbar_button.png)
NextViewportToTop
Display the next viewport in front of all other viewports.
![](../image/command_icons/ortho.png)
Ortho
Restrict cursor movement to an angle.
![](../image/command_icons/orthoangle_rt.png)
OrthoAngle
Set the angle for cursor ortho movement.
![](../image/command_icons/_no_toolbar_button.png)
OptionsPage
Open the Options dialog box at a specified page.
![](../image/command_icons/_no_toolbar_button.png)
PrevViewport
Activate the previous viewport.
![](../image/command_icons/_no_toolbar_button.png)
PushViewportToBack
Send a named viewport behind all viewports.
![](../image/command_icons/_no_toolbar_button.png)
PropertiesPage
Open the Properties panel at a specified page.
![](../image/command_icons/_no_toolbar_button.png)
SetActiveViewport
Activate a named viewport.
![](../image/command_icons/_no_toolbar_button.png)
SetMaximizedViewport
Maximize a named viewport inside the application window.
![](../image/command_icons/_no_toolbar_button.png)
SetOrtho
Turn ortho mode on, off, or toggle the current state.
![](../image/command_icons/_no_toolbar_button.png)
SetPlanar
Turn Planar mode on, off, or toggle the current state.
![](../image/command_icons/_no_toolbar_button.png)
SetSnap
Turn grid snap on, off, or toggle the current state.
![](../image/command_icons/showosnap.png)
ShowOsnap
Show the OSnap panel.
![](../image/command_icons/_no_toolbar_button.png)
Snap
Toggle the current snap mode state.
![](../image/command_icons/snapsize_rt.png)
SnapSize
Specify the grid snap spacing.
Import/Export
![](../image/command_icons/_no_toolbar_button.png)
AssignBlankTexture
Assign texture names to objects.
![](../image/command_icons/_no_toolbar_button.png)
ComputeVertexColors
Evaluate texture coordinates and set vertex colors.