CadFilterLine
from OpenCAD2D import CadFilterLine
class CadFilterLine(System.Object) ยท CadFilterLine in the .NET reference
A line of an object selection filter: what it tests, how, and the value it wants, as "Layer = WALLS", "Arc Radius >= 15.0000" or "Line End X >= 100.0000 Y * 0.0000 Z * 0.0000"; or the begin or end of a group of lines.
Constructors
__init__
def __init__(self, property: CadFilterProperty, value: str, operators: Sequence[str] | System.Array[str]) -> None
Makes a line.
def __init__(self, property: CadFilterProperty, value: str, *operators: str) -> None
Makes a line.
Properties and fields
ColorIndex
@property
def ColorIndex(self) -> int
Gets the colour index a colour line wants; 0 for the other lines.
IsGroupBegin
@property
def IsGroupBegin(self) -> bool
Gets whether the line begins a group.
IsGroupEnd
@property
def IsGroupEnd(self) -> bool
Gets whether the line ends a group.
Name
@property
def Name(self) -> str
Gets the name the Select Filter list gives the property: "Arc Radius", "Xdata ID", "** Begin AND".
Numbers
@property
def Numbers(self) -> System.Collections.Generic.IReadOnlyList[float]
Gets the numbers a colour, a number, an angle (degrees) or a point line wants; none for the other lines.
Operators
@property
def Operators(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the operators of the line: one for a name, a kind, a colour or a number, three (X, Y, Z) for a point, none for a group.
Property
@property
def Property(self) -> CadFilterProperty
Gets what the line tests.
Text
@property
def Text(self) -> str
Gets the line as the filter list shows it: the property padded to 21 characters, then the operator and the value, as "Layer = WALLS", "Arc Radius >= 15.0000" or "Line End X >= 100.0000 Y * 0.0000 Z * 0.0000"; a group's line is its name.
Value
@property
def Value(self) -> str
Gets the value it wants: a name as typed, a colour written as AutoCAD's list writes it ("1 - Red", "256 - By Layer"), a number to four places ("15.0000"), a point as "x,y,z"; empty for the begin or end of a group.
Methods
ColorWords
@staticmethod
def ColorWords(index: int) -> str
Writes a colour index as AutoCAD's filter list writes it: "1 - Red", "8", "256 - By Layer", "0 - By Block".
IsGroup
@staticmethod
def IsGroup(property: CadFilterProperty) -> bool
Gets whether a property begins or ends a group.
IsPoint
@staticmethod
def IsPoint(property: CadFilterProperty) -> bool
Gets whether a property is a point, tested on X, Y and Z each with its own operator.
NameOf
@staticmethod
def NameOf(property: CadFilterProperty) -> str
Gets the name the Select Filter list gives a property: "Arc Radius", "Xdata ID", "** Begin AND".
OperatorsOf
@staticmethod
def OperatorsOf(property: CadFilterProperty) -> System.Collections.Generic.IReadOnlyList[str]
Gets the operators a number or a point may be tested with: = != < <= > >= and, for a coordinate, *.
Passes
def Passes(self, entity: DxfEntity) -> bool
Gets whether an entity passes the line; the begin or end of a group is no test.
TakesOperators
@staticmethod
def TakesOperators(property: CadFilterProperty) -> bool
Gets whether a property is tested with operators (a colour, a number, an angle or a point); a name and a kind are tested with "=" alone.