Layers in AutoCAD are where a drawing keeps its information. A line on a layer called 01-TUONG tells whoever reads the drawing that it is a wall, even though the line itself carries nothing.
A layer also holds three display properties: colour, linetype and lineweight. Giving those to the layer rather than to each line is the only way to keep a drawing consistent once a set runs to hundreds of sheets. To learn modelling and documentation end to end, see the AutoCAD for construction course.
Layers in AutoCAD and the Layer Properties Manager
The LAYER command, aliased LA, opens the layer manager. It is a floating palette rather than a dialog box, so it can stay open all day.
What the numbers mark:
| No. | Element | What it is |
|---|---|---|
| 1 | Four status columns | On, Freeze, Lock and Plot. They decide whether a layer shows, is regenerated, can be edited, and prints |
| 2 | Three property columns | Color, Linetype and Lineweight. Every object on the layer inherits these while set to ByLayer |
| 3 | The count at the foot | Layers shown out of layers in total. The drawing here has 12 layers: layer 0 and eleven numbered layers |
The buttons at the top left fall into two groups. The left group filters and saves states; the right group creates, deletes and selects layers.
| Button | Shortcut | What it does |
|---|---|---|
New Property Filter | Alt+P | Filters layers by one or more properties |
New Group Filter | Alt+G | Creates a group you drag layers into by hand |
Layer States Manager | Alt+S | Saves the whole layer setup under a name |
New Layer | Alt+N | Creates a layer that inherits the properties of the selected one |
Delete Layer | Alt+D | Deletes only a layer nothing uses |
Set Current | Alt+C | Makes the selected layer current, which sets the CLAYER variable |
Autodesk's LAYER page documents the command.
Creating layers and a standard layer set for a building drawing
New Layer immediately produces a layer called LAYER1 with the name highlighted for typing over. The new layer inherits the properties of whichever layer is selected, so select something close to what you want before clicking.
No national standard governs layer names in Vietnamese drawing sets. But four principles turn up in every office that has been doing this for a while.
| Principle | Reason |
|---|---|
| Put digits at the front | Two leading digits keep the list sorted by trade order rather than alphabetically |
| No accented characters | Accented names work, but they break when the file opens on another machine or exports to other software |
| Use hyphens | Easier to read than underscores, and never confused with a space |
| One layer, one job | Do not put walls and doors on the same layer. Separating them is what makes switching and restyling possible |
The layer set in the image at the top of this article follows all four. Its lineweights follow the scale familiar from building drawings: cut lines heaviest, visible lines medium, secondary and dimension lines lightest. The ratio between heaviest and lightest is about four to one, which is enough for the eye to separate them in print.
The four status columns, layer 0 and Defpoints
The four leading columns look alike but do four different jobs.
| Column | Meaning |
|---|---|
On | Off means the layer vanishes from screen but is still regenerated with the drawing |
Freeze | The layer vanishes and is not regenerated either. On a heavy drawing, freezing is quicker than turning off |
Lock | The layer still shows but is faded, and editing commands cannot touch it |
Plot | Whether it prints. The layer still shows on screen but never reaches paper |
Two layers are special and worth knowing about before anything else.
Layer 0 is AutoCAD's own layer. It cannot be deleted or renamed. Do not draw documentation on it: it exists for building blocks, because geometry drawn on layer 0 takes the colour and linetype of whichever layer the block is inserted onto.
The Defpoints layer is created automatically the first time a drawing gets a dimension, to hold the definition points of dimension lines. It arrives with its Plot column already off, so it never prints.
The difference between those two printer icons matters. The red circle is a user choice, and clicking it again turns printing back on. Greyed out means the cell is locked: set Defpoints to print and the software accepts the command without changing anything.
Plenty of people borrow Defpoints as a non-printing notes layer. It is a familiar trick but not a clean one, because that layer belongs to the dimensioning machinery. Making your own layer and switching its Plot column off is clearer, and costs one click.
The Transparency column takes a value from 0 to 90. Where a floor hatch sits over wall lines, setting the hatch layer to somewhere between 60 and 80 keeps the lines underneath readable while the material still reads.
Locked layers: faded does not mean locked
The word "locked" suggests the layer is frozen solid. It is not, and the difference decides how you work day to day.
Lock a layer, then run ERASE and drag a crossing window over objects on that layer and on another. The software answers with two lines:
1 found
1 was on a locked layer.
Read both. The first line belongs to the selection step, the second to the filtering step. The window really does catch the object, and only then does the software drop it from the selection set. Seeing 1 found and pressing Enter without reading the line below leaves you believing something was erased when the drawing is untouched.
How much it fades is set by LAYLOCKFADECTL, which defaults to 50 and accepts whole numbers from minus ninety to ninety. Measuring the brightness of a solid fill on a 255 scale gives this:
| Value | What you see | Brightness |
|---|---|---|
| unlocked | The reference | 255 |
| 0 | No fading at all | 255 |
| 20 | Slightly paler | 212 |
| 50 | The default | 147 |
| 90 | The palest allowed | 60 |
| minus 50 | Remembers fifty but switches the effect off | 255 |
The three middle figures are not arbitrary. The drawing background works out to a brightness of 39, and the blend is 255 × (1 − f) + 39 × f, where f is the variable divided by a hundred. Put 0.2 in and you get 211.8; 0.5 gives 147.0; 0.9 gives 60.6.
The negative value is the trick worth remembering. Set LAYLOCKFADECTL to minus fifty and locked layers draw at full strength again, while the variable still remembers fifty.
And here is the point of the whole section. Lines going back to full strength does not mean the layer is unlocked. Fading is only a signal to the eye; the editing block lives in the Lock column. The two are separate, and people routinely mistake them for one thing.
Eight quick layer tools, and three easily confused commands
The Layers panel carries eight small buttons in two rows. Each is a command whose name begins with LAY, and all eight work the same way: you point at an object instead of typing a layer name.
| Command | What it does |
|---|---|
LAYOFF | Turns off the layer of the object you pick |
LAYISO | Keeps the layer of the picked object, and locks and fades the rest |
LAYFRZ | Freezes the layer of the object you pick |
LAYLCK | Locks the layer of the object you pick |
LAYON | Turns every layer back on |
LAYUNISO | Restores the state from before isolating |
LAYTHW | Thaws every layer |
LAYULK | Unlocks the layer of the object you pick |
LAYISO is regularly misunderstood. It does not turn the other layers off; it locks and fades them, so their lines stay faintly visible as snapping references. The command's first line says so: Current setting: Lock layers, Fade=50. Type S for Settings to change that, choosing between turning layers off, freezing them in the current viewport, or locking and fading. See the LAYISO page.
The command that reverses it is LAYUNISO, and it is not an undo stack. Call it once and every layer returns. Call it again straight away and the software replies No layers to restore from LAYISO command, exactly what it says when nothing was ever isolated. To isolate several layers at once, pick objects from all of them in a single call.
These next three sound alike and are the set most often called by mistake.
| Command | Where the target layer comes from | What changes |
|---|---|---|
LAYMCH | An object you pick | The selected objects change layer |
LAYCUR | The current layer, with nothing else asked | The selected objects change layer |
LAYMCUR | An object you pick | The current layer changes; no object is touched |
The software separates them for you in its closing line. LAYMCH ends with 3 objects changed to layer "03-CUA", while LAYCUR adds (the current layer). Reading the last line tells you which one you just ran.
LAYMCUR has one habit worth knowing. It accepts an object on a locked layer without a word of warning. You can then keep drawing, and the new lines land on that locked layer. What you cannot do is erase what you just drew, because editing is still blocked by the Lock column.
How to delete a layer in AutoCAD, and why it refuses
This is what people search for most around layers, and it is also where drawings get lost.
The Delete Layer button only removes an empty layer. A layer still holding objects is refused, so clicking it by accident costs nothing. LAYDEL is a different matter: Autodesk describes it as "Deletes all objects on a layer and purges the layer". The LAYDEL page adds that it also modifies any block definition using that layer.
Two details there deserve a pause. First, the left-hand box preselects the first entry in the list, not the layer you had in mind; clicking OK out of habit can take out your grid layer and everything on it. Second, the confirmation says outright that all objects on the layer, or referencing it, go as well.
The safe way to run it is to point at an object in the drawing rather than open the box. The command then asks at the command line, prints a warning carrying the word WARNING, and asks Do you wish to continue? [Yes/No] <No>. The default is No, so pressing Enter to hurry through cancels rather than deletes.
For bulk cleaning use PURGE, aliased PU, then pick Layers and Purge All. It only removes layers nothing refers to, which makes it far safer than LAYDEL. The command-line version is -PURGE, handy inside a script. See the PURGE page.
Merging layers, the Layer States Manager and LAYWALK
Drawings that arrive from elsewhere usually carry several layers doing one job under different names. LAYMRG merges them. Autodesk puts it as "Objects on merged layers are moved to the target layer, and the original layers are purged from the drawing". See the LAYMRG page.
The command asks twice: the layer to merge, then the target. Both are picked with the mouse, and both offer a Name option that opens a dialog. That dialog preselects the first entry in the list just as LAYDEL does, so type the name into the field before clicking OK.
Drawing a plan means turning the ceiling layer off. Drawing the ceiling means turning off sanitary ware and turning on lighting. Switching a dozen layers by hand every time you change task guarantees something gets missed. LAYERSTATE solves it.
What the numbers mark:
| No. | Element | What it is |
|---|---|---|
| 1 | The Layer states list | One row per saved state, with the space it was saved in and a column showing whether it still matches the drawing |
| 2 | The button column | New saves the current layer setup, Update overwrites, Edit and Rename adjust, Delete removes. Import and Export exchange states with other drawings |
| 3 | The Restore options block | Turn off layers not found in layer state is ticked: layers added after saving are switched off on restore |
| 4 | The Current layer state line | Reads *UNSAVED* until a state is restored. Pick a name, click Restore, and every layer returns to that state |
This command has no command-line version. Type -LAYERSTATE and the software answers Unknown command. Saving a layer state from a program means calling an AutoLISP function instead.
One more command suits a strange drawing carrying dozens of unexplained layers: LAYWALK. Its box lists every layer, and clicking each name in turn shows what that layer holds. Restore on exit is ticked by default, so closing the box puts everything back.
Frequently asked questions
Which command opens the layer palette?
LAYER, aliased LA. What opens is a floating palette, so it can stay open for the whole working session.
Why will a layer not delete?
Five cases come up: layer 0, the Defpoints layer, the current layer, a layer still holding objects, and a layer that came in with an attached drawing. The last three can be worked around; the first two cannot.
How do I remove unused layers?
Run PURGE, pick Layers and choose Purge All. It only removes layers nothing refers to, which makes it safe. The command-line version is -PURGE.
What is the difference between the Delete Layer button and LAYDEL?
The button only removes an empty layer and refuses one that still holds objects. LAYDEL removes the objects and the layer, so a mistaken click costs part of the drawing.
My locked layer draws at full strength. Is it unlocked?
No. Fading is controlled by LAYLOCKFADECTL, and a negative value switches the fading off while the layer stays locked. The editing block lives in the Lock column, not in the fading.
How do I merge two layers into one?
Run LAYMRG, pick an object on the layer to merge, then an object on the target layer. The objects move across and the original layer is purged from the drawing.
Related articles
- How to enter coordinates in AutoCAD — four ways to type a point, the comma trap and the # prefix
- Object snaps in AutoCAD — thirteen snap modes and how they combine with typed coordinates
- How to draw a rectangle in AutoCAD — the REC command, eight options and the settings that persist
- What is AutoCAD — a handbook for people working in construction