Use scripting

Scripting extends Rhino functionality.

几乎所有 Rhino 的指令都可以使用指令巨集执行,指令巨集可以由指令行输入、工具列按钮、快捷键、指令别名、以 ReadCommandFile 指令或将指令巨集以 Paste 指令粘贴至 Rhino 的指令行执行。

Some commands are provided to facilitate scripting actions usually performed through the Rhino interface.

Specialized commands for scripting

Action

Cancel

Cancel the current command and deselects objects.

删除

Erase objects.

Echo

Turn on echoing of script commands to the command history window.

Enter

Simulate the Enter key in a script.

EnterEnd

Simulate the Enter key to complete a command string in a script.

GetDocumentUserText

Retrieve text information attached to a file with the SetDocumentUserText command.

GetUserText

Retrieve text information attached to an object using the SetUserText command.

NoEcho

Turn off echoing of script commands to the command history window.

Pause

Stop a script for user input.

ReadCommandFile

Read and execute a command script from a text file.

RunPythonScript

Run a Python script.

SetCurrentRenderPlugIn

Specify a rendering plug-in.

SetDisplayMode

Specify a viewport display mode.

SetDocumentUserText

Attach text information to the file.

SetObjectName

Assign a name to an object.

SetRedrawOff

Disable screen redraw, construction plane, and view changes during scripts.

SetRedrawOn

Enable screen redraw, construction plane, and view changes during scripts.

SetUserText

Attach text information to an object.

Interface

ClearUndo

Clear the undo buffer to free memory.

DocumentPropertiesPage

打开文件属性对话框中的页面。

Exit

Close Rhino.

MaxViewport

Maximize the active viewport.

NextOrthoViewport

Activate the next viewport with an orthogonal projection.

NextPerspectiveViewport

Activate the next viewport with a perspective projection.

NextViewport

Activate the next viewport.

Ortho

Restrict cursor movement to an angle.

OrthoAngle

Set the angle for cursor ortho movement.

PrevViewport

Activate the previous viewport.

SetActiveViewport

Activate a named viewport.

SetMaximizedViewport

Maximize a named viewport inside the application window.

SetOrtho

Turn ortho mode on, off, or toggle the current state.

SetPlanar

Turn Planar mode on, off, or toggle the current state.

SetSnap

Turn grid snap on, off, or toggle the current state.

ShowOsnap

Turn the Osnap control on.

Snap

Toggle the current snap mode state.

SnapSize

Specify the grid snap spacing.

Import/Export

ComputeVertexColors

Evaluate texture coordinates and set vertex colors.

请参考

指令巨集与脚本