Last updated July 28, 2026
Click an object, and its layer becomes the current layer. That is the whole routine, and it is one of the most-used operations in drafting — you are about to draw something that belongs with that, so make that layer current.
It is by Art Whitton, finished on 21 November 1996 and revised six days later.
It is coursework, and the header says so
The file’s header records where it was written: a lab directory path, and a room number at BCIT — the British Columbia Institute of Technology. The original filename was the author’s own surname, which is what you call a file when you are handing it in.
That makes it the third piece of student work in this library, alongside two from Billings Vo-Tech in Montana. It is also worth noting who the student was: Art Whitton also wrote the polyline chainage routine and the text matching routine here, both of which are among the best-documented files on this site — full variable tables, a comment on nearly every line, proper error handling.
You can see the habit forming in this one. It is a dozen lines doing something trivial, and it still carries a header block with a description, a finish date and a revision history.
The command is SL
Not SSL, which is what the download is called. Two letters, and two letters that are heavily contested — the TOOLS collection on this site also defines SL, doing something else entirely.
Check it against your own aliases before loading, and if you keep it, consider giving it a name of your own choosing.
Compared with the alternatives here
Three routines on this site do this job, and they are not identical.
- This one — pick an object, done. The simplest of the three and the easiest to read if you are learning.
- LayerMatch — accepts a typed layer name as well as a pick, and reads the layer of objects inside blocks and xrefs rather than the container’s layer.
- LS — will create the layer for you if the name you give does not exist.
If you only ever pick, this is enough. If you work with blocks a lot, LayerMatch handles the nested case better.
How to load it
Unzip SSL.zip and load SSL.lsp with APPLOAD, or put it in the Startup Suite — a command this small only saves time if it is always available. No support files. Our AutoLISP guide covers loading.
Step-by-step usage
- Type SL.
- Click any object on the layer you want to work on.
- That layer is now current. Draw.
Because it reads the picked object’s own layer, clicking a block gives you the block’s layer rather than the layer of whatever you can see inside it. That is usually what you want; when it is not, use LayerMatch.
Compatibility notes
1996, so written-for rather than tested-on, though there is almost nothing in it that could age — it reads one property off an object and sets one system variable.
Plain AutoLISP with no dialog boxes and no Express Tools calls, so nothing requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, should be able to run it. See what runs on AutoCAD LT. It changes a setting rather than any geometry, so there is nothing at risk in trying it.
Download
| Name: | Set Layer By Selection |
| Description: | This program will reset the current layer to the layer of a user picked entity. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Art Whitton |
| File Size: | 1 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | SSL.zip |
Related routines
- LayerMatch — the same job, reading inside blocks and xrefs.
- PDIST — the same author’s chainage routine, and a model of documentation.
- CHGTEXT — his text height and style matcher.