RotateObject



Your Ad Here

Rotates a single object. Rotation is based on the active construction plane.

Syntax

Rhino.RotateObject (strObject, arrPoint, dblAngle [, arrAxis [, blnCopy]])

Parameters

strObject

Required. String. The identifier of the object to rotate.

arrPoint

Required. Array. The 3D center point of the rotation.

dblAngle

Required. Number. The rotation angle in degrees.

arrAxis

Optional. Array. A 3D vector that identifies the axis of rotation. If omitted, the Z-axis of the active construction plane is used as the rotation axis.

blnCopy

Optional. Boolean. Copy the object. If omitted, the object will not be copied (False).

Returns

String

The identifier of the rotated object if successful.

Null

If not successful, or on error.

Example

Dim strObject, arrPoint

strObject = Rhino.GetObject("Select object to rotate")

If (strObject <> vbNull) Then

arrPoint = Rhino.GetPoint("Center point of rotation")

If IsArray(arrPoint) Then

Rhino.RotateObject strObject, arrPoint, 45.0, ,vbTrue

End If

End If

Also See

RotateObjects

Return to Rhino Index


Your Ad Here