eplisp

Delete Layer Contents (LWP)

eplisp, the free multilingual LISP library

Delete Layer Contents (LWP)
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsLWP
CategoryCleanup and Files
AuthorBGol Community
Sourcethevijayparmar/bgol-cad-lisps
LicenseMIT
RequirementsAutoCAD, AutoCAD LT 2024 or later, BricsCAD (no ActiveX calls)
Prompt languageEnglish
FilesLYRWIPE-bgol.lsp (3 KB)
Added2026-10-26
Download the original fileSource repository

LWP erases every object on the layer of one picked object, in model space and all layouts, without asking for confirmation; the layer itself stays.

LWP is a cleanup tool for quickly emptying a layer. You do not need to know the layer name or open the layer manager; picking any object on that layer is enough. It is handy for clearing unwanted layers that come with drawings from other parties.

Overview

The command reads the layer name of the picked object, finds every object on that layer in the whole drawing (model space and all layouts) and erases them one by one. The number of erased objects is reported on the command line. The layer definition remains; run PURGE afterwards to remove it.

How to use it

  1. Load LYRWIPE-bgol.lsp with APPLOAD.
  2. Type LWP at the command line.
  3. Pick any object on the layer you want to clear.
  4. If needed, run PURGE to remove the empty layer.

Notes and limitations

  • Erases objects in bulk without confirmation; if you picked the wrong layer, undo with U right away.
  • Erasing applies to model space and every layout, not only the current one.
  • Objects inside block definitions are not touched.
  • Objects on a locked layer are not erased.
  • The repository is new (2026); 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.

References

  1. Source repository: thevijayparmar/bgol-cad-lisps – https://github.com/thevijayparmar/bgol-cad-lisps
  2. Author: BGol Community – https://bgol.in/
  3. License: MIT – https://github.com/thevijayparmar/bgol-cad-lisps/blob/3acbe32f71b489f4c81dcd9372f989591a9be858/LICENSE

Found a mistake, or are you the author of this tool? Request a correction or removal