Layer Commands
Layer Commands
Layer commands are used to manage and control layers, including creating, modifying, and toggling layer visibility.
Layer Concepts
Layers are an important tool for organizing graphics in CAD:
- Each entity resides on a layer
- Layers control entity visibility, color, linetype, and other properties
- The default layer is "0" and cannot be deleted
LAYER - Layer Management
Opens the layer management dialog.
Command: LAYER
Alias: LA
Usage
Command: LAYER
Layer management dialogAfter execution, the layer management dialog opens. You can perform the following operations:
| Feature | Description |
|---|---|
| Add Layer | Create a new layer |
| Delete Layer | Delete selected layers (unused only) |
| Purge Layers | Delete all unused layers |
| Sort | Sort layers by name |
| Move Up/Down | Adjust layer order |
| Set Current | Double-click the "Current" column to set as current |
| Show/Hide | Control layer visibility |
| Color | Set layer default color |
| Linetype | Set layer default linetype |
| Lineweight | Set layer default lineweight |
| Transparency | Set layer transparency |
| Plot | Control whether layer is plottable |
LAYALLON - Turn On All Layers
Turns on visibility for all layers.
Command: LAYALLON
Usage
Command: LAYALLON
Display all layersLAYALLOFF - Turn Off All Layers
Turns off all layers except the current layer.
Command: LAYALLOFF
Usage
Command: LAYALLOFF
Hide all layers except the current layerLAYCUR - Set Current Layer
Sets the layer of the selected objects as the current layer.
Command: LAYCUR
Usage
Command: LAYCUR
Select objects: <Select objects>LAYMCUR - Match Current Layer
Moves selected objects to the current layer.
Command: LAYMCUR
Usage
Command: LAYMCUR
Select objects: <Select objects to move>LAYREV - Invert Layer States
Inverts the on/off state of all layers.
Command: LAYREV
Usage
Command: LAYREVLAYPICKON - Pick to Turn On Layer
Turns on the layer of an object by picking it.
Command: LAYPICKON
Usage
Command: LAYPICKON
Select objects: <Pick objects>LAYPICKOFF - Pick to Turn Off Layer
Turns off the layer of an object by picking it.
Command: LAYPICKOFF
Usage
Command: LAYPICKOFF
Select objects: <Pick objects>LAYSSON - Turn On Selection Set Layers
Turns on all layers that contain objects in the current selection set.
Command: LAYSSON
Usage
Command: LAYSSON
Select objects: <Select multiple objects>LAYSSOFF - Turn Off Selection Set Layers
Turns off all layers that contain objects in the current selection set.
Command: LAYSSOFF
Usage
Command: LAYSSOFF
Select objects: <Select multiple objects>LAYDRAWBACK - Send Layer to Back
Sends the draw order of the layer containing the selected objects to the back.
Command: LAYDRAWBACK
Usage
Command: LAYDRAWBACK
Select objects: <Select objects>LAYDRAWFRONT - Bring Layer to Front
Brings the draw order of the layer containing the selected objects to the front.
Command: LAYDRAWFRONT
Usage
Command: LAYDRAWFRONT
Select objects: <Select objects>CLAYER - Current Layer Variable
Sets or queries the current layer.
Command: CLAYER
Usage
Command: CLAYER
CLAYER <current layer name>: <Enter new layer name>MAKELAYER - New Layer
Quickly create a new layer in the layer dialog.
Layer Management Best Practices
Layer Naming Convention
It is recommended to name layers by function or type:
| Layer Name | Purpose |
|---|---|
0 | Default layer |
Wall | Building walls |
Door-Window | Doors and windows |
Dimension | Dimension annotations |
Text | Text annotations |
Construction | Construction lines, reference lines |
DEFPOINTS | Dimension definition points (not plottable) |
Layer Color Convention
Use different colors to distinguish layers:
| Color Index | Color | Suggested Use |
|---|---|---|
| 1 | Red | Important lines |
| 2 | Yellow | Construction lines |
| 3 | Green | Landscaping, plants |
| 4 | Cyan | Water, pipelines |
| 5 | Blue | Furniture |
| 6 | Magenta | Electrical |
| 7 | White/Black | General purpose |
Script Examples
; Set current layer
CLAYER
Wall
; Draw walls
LINE
0,0
1000,0
; Switch layer for dimensions
CLAYER
Dimension
DIMLINEAR
0,0
1000,0
0,-200Next Steps
- Block Commands - Block definition and management
- Property Commands - Modify entity properties
- Command Reference - View all commands