eplisp

AutoCAD Set Current Layer LISP: Click an Object to Set Layer

eplisp, the free multilingual LISP library

Set Current Layer by Pick
Written by eplisp; available in English and Turkish.
…
Rate this tool:
CommandsLAYSETPICK
CategoryLayer Tools
Authoreplisp
LicenseFree (eplisp)
Version2.0.0
RequirementsAutoCAD, GstarCAD
Prompt languageEnglish / Turkish
Fileslaysetpick.lsp (15 KB)
Download

Makes the layer of a clicked object the current layer.

LAYSETPICK is an AutoCAD set current layer LISP tool: click an object in the drawing and its layer becomes the current layer. In projects with hundreds of layers, finding the right one in the list takes time; here you just click an example that is already in the drawing.

Commands: LAYSETPICK

Load the downloaded .lsp file with the APPLOAD command in AutoCAD or GstarCAD, then type the command name. How to load a LISP file

Download all eplisp tools in one file (138 KB)

Overview

AutoCAD's built-in LAYMCUR (Make Object's Layer Current) does the same thing. LAYSETPICK gives you one short command name that behaves the same in full AutoCAD and in GstarCAD, and it prints the new current layer name on the command line.

The tool only changes the CLAYER system variable; no objects in the drawing are modified.

How to use it

  1. Load laysetpick.lsp with APPLOAD.
  2. Type LAYSETPICK at the command line.
  3. Click the object whose layer you want to make current.
  4. Check the current layer name on the command line and keep drawing.

Notes and tips

  • If you click a block, the block reference's layer becomes current, not the layer of the nested object under the cursor.
  • Objects on layers that are off or frozen are not visible, so they cannot be picked.
  • Pair it with LAYTOCUR to bring other objects onto the layer you just made current.

Frequently asked questions

How do I make an object's layer current in AutoCAD?

Run LAYSETPICK and click the object. Its layer becomes current and the name is printed on the command line. AutoCAD's built-in LAYMCUR gives the same result.

Does it change the object I click?

No. Only the current layer setting changes; the object stays exactly as it was.

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