GetObject

Prompts the user to pick, or select, a single object.

Syntax

Rhino.GetObject ([strMessage [, intType [, blnPreSelect [, blnSelect [, arrObjects ]]]]])

Parameters

strMessage

Optional.  String.  A prompt or message.

intType

Optional.  Number.  The type or types of geometry objects (points, curves, surfaces, meshes, etc.) that can be selected.  Object types can be added together to filter several different kinds of geometry.

Value

Hex

Description

0

&h0

All objects (default)

1

&h1

Point

2

&h2

Point cloud

4

&h4

Curve

8

&h8

Surface (single-face Brep or Extrusion)

16

&h10

Polysurface (multiple-face Brep or Extrusion)

32

&h20

Mesh

256

&h100

Light

512

&h200

Annotation

4096

&h1000

Instance (Block) reference

8192

&h2000

Text dot

16384

&h4000

Grip

32768

&h8000

Detail

65536

&h10000

Hatch

131072

&h20000

Morph control

134217728

&h8000000

Cage

268435456

&h10000000

Phantom

536870912

&h20000000

Clipping plane

1073741824

&h40000000

Extrusion

blnPreSelect

Optional.  Boolean.  Allow for the selection of pre-selected objects.  If omitted, pre-selected objects are not accepted (False).

blnSelect

Optional.  Boolean.  Specifies whether or not the picked objects will remain selected when the function ends.  If omitted, objects that were pre-picked will remain selected and the objects that were post-picked will not be selected.

arrObjects

Optional.  Array.  An array of strings identifying the objects that are allowed to be selected.

Returns

String

The identifier of the picked object if successful.

Null

If not successful, or on error.

Example

Dim strObject

strObject = Rhino.GetObject("Pick any object")

If Not IsNull(strObject) Then

Rhino.Print "Object identifier: " & strObject

End If

strObject = Rhino.GetObject("Pick a curve or surface", 4 + 8)

If Not IsNull(strObject) Then

Rhino.Print "Object identifier: " & strObject

End If

strObject = Rhino.GetObject("Select any object", , , True)

If Not IsNull(strObject) Then

Rhino.Print "Object identifier: " & strObject

End If

Also See

GetCurveObject

GetObjectEx

GetObjects

GetSurfaceObject