Delete Everything on a Layer
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | LDEL |
|---|---|
| Category | Layer Tools |
| Author | Michael Flynn |
| Source | mf4633/C3D-AutoCAD |
| License | MIT |
| Version | 1.2 |
| Updated | 2026-07-07 |
| Requirements | AutoCAD (full version, not LT), Civil 3D, BricsCAD. |
| Prompt language | English |
| Files | laydel.lsp (2 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
LDEL erases every object on the layer of a picked object after a Y/N confirmation; it refuses locked layers and keeps the layer itself.
LDEL, one of Michael Flynn's routines, clears everything on a layer in one step. Instead of typing a layer name you pick any object on that layer, which is handy for removing underlays, temporary construction lines or an unwanted layer's content.
Overview
After the pick, a confirmation prompt shows the layer name; the default answer is No (N). If you answer Y, the routine first checks whether the layer is locked; if it is, nothing is erased and a warning is shown. Otherwise all objects on the layer are found with ssget X, erased with the ERASE command, and the count is reported. The layer definition stays in the drawing.
How to use it
- Load laydel.lsp with APPLOAD.
- Type LDEL at the command line.
- Pick any object on the layer you want to clear.
- Type Y at the confirmation prompt and press Enter.
Notes and limitations
- This command erases objects. If you run it by mistake, use UNDO.
- The selection scans the whole drawing (ssget X), but ERASE only removes objects in the current space. Objects in other layouts may remain, and the reported count can be higher than what was actually erased.
- Objects on that layer inside block definitions are not touched; only top-level objects are erased.
- Nothing happens on a locked layer; objects on frozen layers may be skipped by ERASE.
- Version 1.2 (2026-07-07) according to the file header. The repository was published in 2026 and the amount of testing is not stated; try it on a copy of the drawing first.
Source and license
This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.
- laydel.lsp (2 KB)
- License text
References
- Source repository: mf4633/C3D-AutoCAD – https://github.com/mf4633/C3D-AutoCAD
- Author: Michael Flynn – https://github.com/mf4633
- License: MIT – https://github.com/mf4633/C3D-AutoCAD/blob/eeeda7b7b3ffe98917d4b2b3d329d6b84a966035/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal