Method Select
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Select(CadDocument, CadSpace, CadAreaSelection, IReadOnlyList<GeoPoint2>, double)
Takes the entities of a space by where they are drawn, as "Select objects:" takes them, but whole: the answer is not held to the view of a window, so the same drawing gives the same handles with a window or without. A box from (0, 0) to (100, 50) in Window takes a line from (10, 10) to (20, 10) and leaves a circle of radius 30 about (50, 25), which Crossing takes. The pickfirst selection of the drawing is not changed, and objects on locked, off or frozen layers are taken as the space draws them (what draws nothing is not found).
public static IReadOnlyList<string> Select(CadDocument document, CadSpace space, CadAreaSelection how, IReadOnlyList<GeoPoint2> points, double tolerance)
Parameters
documentCadDocumentThe drawing.
spaceCadSpaceThe space: model space or a layout of the drawing.
howCadAreaSelectionWhat the points mean.
pointsIReadOnlyList<GeoPoint2>Two corners for Window and Crossing, two or more for a fence, three or more for a polygon, one for a point.
tolerancedoubleFor Point, how far from the point an entity may pass, above nought; not used by the others.
Returns
- IReadOnlyList<string>
The handles, in the order the space draws its entities (the first viewport of a layout left out); for a point, the one picked first leading.
Exceptions
- ArgumentNullException
Thrown when the document, the space or the points are null.
- ArgumentException
Thrown when a point is not finite, or there are too few or too many points for the selection, or the tolerance of a point is not above nought.