GetCursorPos

Retrieves the cursor's position.

Syntax

Rhino.GetCursorPos ()

Parameters

None.

Returns

Array

An array containing the following information if successful:

Element

Description

0

Array.  The cursor position in world (3-D) coordinates.

1

Array.  The cursor position in screen (2-D) coordinates.

2

String.  The identifier of the currently active view.

3

Array.  The cursor position in client (2-D) coordinates.

Null

If not successful, or on error.

Example

Dim arrCursor

arrCursor = Rhino.GetCursorPos

Rhino.Print "World = " & Rhino.Pt2Str(arrCursor(0))

Rhino.Print "Screen= " & Rhino.Pt2Str(arrCursor(1))

Rhino.Print "View = " & arrCursor(2)

Rhino.Print "Client = " & Rhino.Pt2Str(arrCursor(3))

Rhino.AddPoint arrCursor(0)

Also See

XFormScreenToWorld

XFormWorldToScreen