Class CadLayerWalkRequest
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The LayerWalk dialog of LAYWALK, as data its command and the window share: the layers listed, the filter that narrows them, the layers walked, and the choice to put the layers back as they were when it closes. Walking layers turns every layer but those selected off and thaws those selected, as AutoCAD's LayerWalk shows only the objects on the layers selected; with none selected every layer is as it was. A drawing of the layers WALL, DOOR and TRIM, walked on DOOR, shows the objects on DOOR alone; closed with Restore on exit, it has all three as they were. The changes are edits of the command's one undo step.
public sealed class CadLayerWalkRequest
- Inheritance
-
CadLayerWalkRequest
- Inherited Members
Properties
- Action
Gets or sets what the dialog closed with: Cancel for Close, SelectObjects for Select objects, which asks on the canvas and shows the dialog again.
- Document
Gets the document.
- Filter
Gets or sets the words the list is narrowed by, a wild-card pattern as the AutoCAD filter box takes it (
WALL*,-EXT,DOOR?); empty orlists every layer.
- Message
Gets what the last change said where it was refused; null where it was made.
- RestoreOnExit
Gets or sets whether closing the dialog puts the layers back as they were; true until set, as AutoCAD's Restore on exit.
- Rows
Gets every layer of the drawing, in ordinal order of the names, letters of either case alike.
- Selected
Gets the names of the layers walked now; empty where every layer is as it was.
Methods
- Purge(IEnumerable<string>)
Purge Layers: deletes the layers named that nothing uses, as the dialog's menu does; a layer in use, the current layer, 0 and Defpoints are kept; a layer a viewport freezes is thawed there and deleted. Each layer is deleted on its own, so that one that is refused leaves the others deleted. A layer deleted leaves the list.
- Restore()
Puts every layer back as it was before the walk, as closing with Restore on exit does.
- Walk(IReadOnlyCollection<string>)
Walks layers: every layer but those named is turned off, those named turned on and thawed. A name no layer has is left out; none given shows every layer as it was.
- WalkLayersOf(IEnumerable<string>)
Select objects: walks the layers of the objects picked on the canvas, as AutoCAD's button selects them in the list.