GetPoint

Pauses for user input of a point.

Syntax

Rhino.GetPoint ([strMessage [, arrPoint [, dblDistance [, blnPlane [, blnSnapObject]]]]])

Rhino.GetPoint ([strMessage [, arrPoint [, arrEndPoint [, blnPlane [, blnSnapObject]]]]])

Parameters

strMessage

Optional.  String.  A prompt or message.

arrPoint

Optional.  Array.  A starting, or base, point.

dblDistance

Optional.  Number.  If arrPoint is specified, then dblDistance is distance from the base point to which point picking is constrained.

arrEndPoint

Optional.  Array.  If arrPoint is specified, then arrEndPoint is the end point of the line, between the two points, to which point picking is constrained.

blnPlane

Optional.  Boolean.  Constrain the point selection to the active construction plane.

blnSnapObject

Optional.  Boolean.  If specified, then both the picked point and the identifier of the object that the point was snapped to is returned. If no object was snapped to, then Null is returned.

Returns

Array

If blnSnapObject was not specified or false, then the 3-D point input by the user, if successful.

If blnSpapObject was specified and true, then an array containing the following, if successful:

Element

Type

Description

0

Array

The 3-D point input by the user.

1

String

The identifier of the object that the point was snapped to. If no object was snapped to, then this element will be Null.

2

String

The identifier of the viewport or layout in which the point was input.

3

String

If the point was input in a detail view, then the identifier of the active detail view is returned. Otherwise, this element will be Null.

4

String

If the object was snapped to in an inactive detail view, then the identifier of the inactive detail view is returned. Otherwise, this element will be Null.

Null

If not successful, or on error.

Example

Dim arrPt1, arrPt2, arrPt3, dblDistance

arrPt1 = Rhino.GetPoint("Pick first point")

If IsArray(arrPt1) Then

Rhino.AddPoint(arrPt1)

arrPt2 = Rhino.GetPoint("Pick second point", arrPt1)

If IsArray(arrPt2) Then

Rhino.AddPoint(arrPt2)

dblDistance = Rhino.Distance(arrPt1, arrPt2)

arrPt3 = Rhino.GetPoint("Pick third point", arrPt2, dblDistance)

If IsArray(arrPt3) then

Rhino.AddPoint arrPt3

End If

End If

End If

Also See

GetPointOnCurve

GetPointOnSurface

GetPoints

GetRectangle