GetRectangle

Pauses for user input of a rectangle.

Syntax

Rhino.GetRectangle ([intMode [, arrPoint [, strPrompt1 [, strPrompt2 [, strPrompt3]]]]])

Parameters

intMode

Optional.  Number.  The rectangle selection mode.  If not specified, all modes (0) are available.  The rectangle selection modes are as follows:

Value

Description

0

All modes.

1

Corner.  A rectangle is created by picking two corner points.

2

3-Point.  A rectangle is created by picking three points

3

Vertical.  A vertical rectangle is created by picking three points.

4

Center.  A rectangle is created by picking a center point and a corner point.

arrPoint

Optional.  Array.  A 3-D base point.

strPrompt1

Optional.  String.  The first prompt or message.

strPrompt2

Optional.  String.  The second prompt or message.

strPrompt3

Optional.  String.  The third prompt or message.  The third prompt used only with 3Point and Vertical modes.

Returns

Array

An array of four 3-D points that define the corners of the rectangle if successful.  Points are returned in counter-clockwise order.  See the image below for details.

Null

If not successful, or on error.

Example

Dim arrRect

arrRect = Rhino.GetRectangle

If IsArray(arrRect) Then

Rhino.AddTextDot "0", arrRect(0)

Rhino.AddTextDot "1", arrRect(1)

Rhino.AddTextDot "2", arrRect(2)

Rhino.AddTextDot "3", arrRect(3)

End If

getrectangle.jpg

Also See

GetPoint

GetPoints