Table of Contents

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

.NET

@property
def Children(self) -> System.Collections.Generic.IReadOnlyList[CadLayerFilter]

Gets the filters nested in it, by name.

Expression

.NET

@property
def Expression(self) -> str

Gets the expression of a property filter as the drawing keeps it; empty for a group filter.

IsCurrent

.NET

@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

.NET

@property
def IsLegacy(self) -> bool

Gets whether only ACAD_LAYERFILTERS, the dictionary of AutoCAD 2004 and earlier, keeps it.

Kind

.NET

@property
def Kind(self) -> CadLayerFilterKind

Gets whether it is a property filter or a group filter.

LayerNames

.NET

@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

.NET

@property
def Name(self) -> str

Gets the name.

Parent

.NET

@property
def Parent(self) -> CadLayerFilter | None

Gets the filter it is nested in; null for one at the top, under All.

Path

.NET

@property
def Path(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names from the top to this filter, as Steel, Beams.

Methods

ToString

.NET

def ToString(self) -> str

Gives the filter as a line for debugging: its path.