CadLayerFilter
from OpenCAD2D import CadLayerFilter
class CadLayerFilter(System.Object) ยท CadLayerFilter in the .NET reference
A layer filter the drawing keeps, as AutoCAD 2021 keeps it in ACLYDICTIONARY of the layer table's extension dictionary: an XRECORD of its name (group 300) and its expression (301) for a property filter, or its layers (a 330 each) for a group filter, the filter nested in it in an ACLYDICTIONARY of its own XRECORD's extension dictionary.
Properties and fields
Children
@property
def Children(self) -> System.Collections.Generic.IReadOnlyList[CadLayerFilter]
Gets the filters nested in it, by name.
Expression
@property
def Expression(self) -> str
Gets the expression of a property filter as the drawing keeps it; empty for a group filter.
IsCurrent
@property
def IsCurrent(self) -> bool
Gets whether it is the filter AutoCAD marks as the current one (group 290), the one the layer list shows.
IsLegacy
@property
def IsLegacy(self) -> bool
Gets whether only ACAD_LAYERFILTERS, the dictionary of AutoCAD 2004 and earlier, keeps it.
Kind
@property
def Kind(self) -> CadLayerFilterKind
Gets whether it is a property filter or a group filter.
LayerNames
@property
def LayerNames(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the names of the layers of a group filter, by name; empty for a property filter.
Name
@property
def Name(self) -> str
Gets the name.
Parent
@property
def Parent(self) -> CadLayerFilter | None
Gets the filter it is nested in; null for one at the top, under All.
Path
@property
def Path(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the names from the top to this filter, as Steel, Beams.
Methods
ToString
def ToString(self) -> str
Gives the filter as a line for debugging: its path.