eplisp

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

Makes the layer of a clicked object the current layer.

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 tools in one file (138 KB)

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.

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.