Class CadLayerStatesRequest
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The Layer States Manager of LAYERSTATE, as data its command and the window share: the states of the drawing, the one chosen, the restore options and the properties it restores. New, Update, Rename, Delete, Import, Export and the properties ticked change the drawing while the dialog stays open, each as an edit of the command's one undo step; Restore restores the state chosen and closes it, Close keeps every change.
public sealed class CadLayerStatesRequest
- Inheritance
-
CadLayerStatesRequest
- Inherited Members
Properties
- Action
Gets or sets what the dialog was closed with: OK for Restore, Cancel for Close; Cancel until set.
- AsViewportOverrides
Gets or sets whether Restore puts the properties on the current viewport as overrides; only in a layout.
- Current
Gets the name of the state the drawing is as, or UNSAVED where no state is the same as the drawing.
- Document
Gets the document.
- HideXrefStates
Gets or sets whether the states of xrefs are left out of the list (Don't list layer states in Xrefs); true until set.
- IsModelSpace
Gets whether the drawing shows model space, where Apply properties as viewport overrides is greyed.
- Message
Gets what the last change said where it was refused, as "A layer state named Plan already exists."; null where it was made.
- Selected
Gets or sets the name of the state chosen; null for none.
- States
Gets the states listed, in ordinal order of their names, letters of either case alike; a named view's snapshot is not among them.
- TurnOffMissing
Gets or sets whether Restore turns off the layers the state does not name (Turn off layers not found in layer state).
Methods
- BeginEdit()
Edit…: the layers of the state chosen, to be changed and written back by Edit(CadLayerStateEdit).
- Delete()
Delete: the state chosen taken out.
- Edit(CadLayerStateEdit)
OK of Edit Layer State: the state written from the edit, its layers and the properties it restores.
- Export(string)
Export: the state chosen written to a .las file.
- Has(string)
Gets whether the drawing has a state of a name, letters of either case the same, as New asks before it replaces one.
- Import(string)
Import: the states of a .las file read into the drawing.
- New(string, string)
New: the layers as they stand saved as a new state.
- Relist()
The states read again from the drawing, as HideXrefStates switched lists them.
- Rename(string)
Rename: the state chosen given a new name.
- Replace(string, string)
New over a state of the name: the state replaced by the layers as they stand, its description by the one given and the properties it restores kept, as AutoCAD's New does once its question is answered Yes.
- SetMask(int)
The properties the state chosen restores, as AutoCAD's mask (1 on, 2 frozen, 4 locked, 8 plot, 0x20 colour and on).
- Update()
Update: the state chosen saved again from the layers as they stand, its properties kept.