Table of Contents

CadLayerStateEdit

from OpenCAD2D import CadLayerStateEdit

class CadLayerStateEdit(System.Object) ยท CadLayerStateEdit in the .NET reference

AutoCAD's Edit Layer State of a state: the layers it saved with their properties, those of the drawing not in it, which Add layers puts in, and the properties it restores. CadLayerStatesRequest.Edit writes it into the state as an edit of LAYERSTATE's one undo step; the drawing's layers are left as they are.

Properties and fields

Layers

.NET

@property
def Layers(self) -> System.Collections.Generic.List[CadLayerStateLayer]

Gets the layers of the state, in the order of the Layer manager: by name, letters of either case alike.

Mask

.NET

@property
def Mask(self) -> int
@Mask.setter
def Mask(self, value: int) -> None

Gets or sets the properties the state restores, as AutoCAD's mask (1 on, 2 frozen, 4 locked, 8 plot, 0x20 colour and on).

Name

.NET

@property
def Name(self) -> str

Gets the state's name.

Methods

Add

.NET

def Add(self, name: str) -> CadLayerStateLayer

Puts a layer of the drawing into the state with its properties as they stand, as Add layers does.

Differs

.NET

def Differs(self, layer: CadLayerStateLayer) -> bool

Whether a layer of the state differs from the drawing's layer of the name, in a property the state restores; false for one the drawing has not.

LayersNotInState

.NET

def LayersNotInState(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the drawing's layers the state does not name, by name, which Add layers offers; a layer of an xref is not one.