CadQuickSelect
from OpenCAD2D import CadQuickSelect
class CadQuickSelect(System.Object) ยท CadQuickSelect in the .NET reference
Quick Select (QSELECT), as AutoCAD's: the objects of a space, or of the selection, of one type or of every type (Multiple), whose property compares with a value as the operator says, included in a new selection or excluded from it, appended to the selection or in its place. The properties are the rows of the Properties panel (CadProperties), their values compared as the panel writes them: a line 500 long has the Length 500.0000, and Length > 400 takes it.
Constructors
__init__
def __init__(
self,
document: CadDocument,
space: CadSpace | None = ...,
current: System.Collections.Generic.IEnumerable[str] | None = ...,
) -> None
Makes a Quick Select over the objects of a space, or of some of them.
Properties and fields
Multiple
Multiple: ClassVar[str]
The object type that stands for every type, as AutoCAD's Multiple.
Count
@property
def Count(self) -> int
Gets how many objects are in scope.
ObjectTypes
@property
def ObjectTypes(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the types of the objects in scope as the Properties panel names them (Line, Circle, MText), in ordinal order, after CadQuickSelect.Multiple where there are any.
Space
@property
def Space(self) -> CadSpace
Gets the space the objects are of.
Methods
Apply
def Apply(self, matched: System.Collections.Generic.IReadOnlyList[str], append: bool) -> str
Applies a match to the document's selection, as OK does: appended to it, or in its place; and says "N item(s) selected." of the selection made.
IsListed
@staticmethod
def IsListed(property: str) -> bool
Gets whether Value lists the values of a property rather than taking one typed: Color, Layer, Linetype and Lineweight.
Match
def Match(
self,
objectType: str,
property: str,
op: CadQuickSelectOperator,
value: str,
include: bool,
tolerance: Tolerance,
) -> System.Collections.Generic.IReadOnlyList[str]
Gets the objects that match: those of the type whose property compares with the value as the operator says, or with include false those of the type that do not; in ordinal order of their handles.
PropertiesOf
def PropertiesOf(self, objectType: str) -> System.Collections.Generic.IReadOnlyList[str]
Gets the properties of a type, as the Properties panel lists them for an object of it: Color, Layer, Linetype, Linetype scale and Lineweight, then those of its kind (Start X to Angle for a line); the General ones alone for CadQuickSelect.Multiple.
ValuesOf
def ValuesOf(self, objectType: str, property: str) -> System.Collections.Generic.IReadOnlyList[str]
Gets the values in use of a property that Value offers as a list (Color, Layer, Linetype, Lineweight) among the objects of a type in scope, in ordinal order, letters of either case together; empty for one whose value is typed.