ObjectsByRegion

Returns the identifiers of objects based on the objects' geometry type.

Syntax

Rhino.ObjectsByRegion (arrPoints, intMode, intType, strView, blnSelect)

Parameters

arrPoints

Required.  Array.  An array of 3-D points that define the selection region.  The array must contain at least three 3-D points.

intMode

Required.  Number.  The selection mode, where:

Value

Hex

Description

(Default) 0

&h0

Window selection (Default)

1

&h1

Crossing selection

2

&h2

Outside of window selection

3

&h3

Outside of crossing selection

intType

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

Value

Hex

Description

 (Default) 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

strView

Optional.  String.  The title or identifier of the view.  If omitted, the current active view is used.

blnSelect

Optional.  Boolean.  Select the objects.  If omitted, the objects are not selected (False).

Returns

Array

An array of strings identifying the objects if successful.

Null

If not successful, or on error.

Example

Dim arrPoints, arrObjects, i

arrPoints = Rhino.GetPolyline

If IsArray(arrPoints) Then

  arrObjects = Rhino.ObjectsByRegion(arrPoints, 0)

  If IsArray(arrObjects) Then

    For i = 0 to UBound(arrObjects)

      Rhino.Print arrObjects(i)

    Next

  End If

End If

Also See

ObjectsByType

ObjectType