SelectByPolygon Method

Selects objects within a fence and adds them to the selection set.

See Also | Example

Signature

object.SelectByPolygon Mode, PointsList, FilterType, FilterData

Object

SelectionSet
The object or objects this method applies to.

Mode

AcSelect enum; input-only

acSelectionSetFence

acSelectionSetWindowPolygon

acSelectionSetCrossingPolygon

PointsList

Variant (array of doubles); input-only
An array of 3D WCS coordinates specifying the selection fence.

FilterType

Integer; input-only; optional
A DXF group code specifying the type of filter to use.

FilterData

Variant; input-only; optional
The value to filter on.

Remarks

The following selection modes are available:

Fence

Selects all objects crossing a selection fence. The fence is defined by coordinates in Point1.

WindowPolygon

Selects objects within a polygon defined by Point1.

CrossingPolygon

Selects objects within and crossing an area defined by a polygon. Use Point1 to define the coordinates of the polygon. AutoCAD will close the last vector of the polygon. A polygon definition cannot cross itself.

This method supports the filtering mechanism.

For more selection mode options, see the Select, SelectAtPoint, and SelectOnScreen methods.

 

   Comments?