Last updated July 28, 2026
MLAYER moves everything on a layer. Type the layer name, and every object on it — wherever it is in the drawing — is gathered up and handed to the MOVE command for you to place.
It is by Paul Standing, dated 1995, and he also wrote the three-tangent circle and double offset routines on this site.
Selecting by layer, not by window
The point of it is the selection, not the move. Windowing a layer’s worth of objects means either isolating the layer first or picking carefully around everything else, and either way you will miss whatever is off screen.
This searches the whole drawing database by layer name, so it finds everything — including objects on parts of the drawing you are not looking at. That is genuinely useful when a whole layer has been drawn in the wrong place and needs shifting as a unit.
It also means you should be sure of the layer name before you commit. There is no confirmation and no report of how many objects were found, so a typo gives you an empty selection and a slightly confusing MOVE prompt rather than a clear error.
Note that a database-wide search does not respect layouts. If the layer has objects in both model space and a paper space layout, both will be caught up in the same move, which is almost certainly not what you want. Check before running it on a drawing with populated layouts.
It hands the move back to you
The routine does not ask you where to move things. It starts the MOVE command with the selection already made and then steps out of the way, so you complete the move exactly as you would normally — base point, then destination, with all the usual snaps and coordinate entry available.
That is a sensible division of labour: the routine does the part AutoCAD makes awkward, and leaves the part AutoCAD already does well alone.
One consequence worth knowing: because the routine finishes while the MOVE command is still waiting for you, it restores command echo partway through your move rather than at the end. Harmless, but it explains why the command line may look busier than you expected.
Command reference
The file defines a single command, MLAYER.
Note that AutoCAD has an MLAYER-ish family of layer commands of its own in Express Tools, and the LLP Suite here defines a great many layer commands too. Check for a clash before loading if you have either.
How to load it
Unzip Mlayer.zip and load MLAYER.LSP with APPLOAD. No support files. Our AutoLISP guide covers loading.
Step-by-step usage
- Save first. This moves objects you cannot see, which makes checking the result harder than usual.
- Type MLAYER.
- At “ENTER LAYER TO MOVE:” type the layer name exactly. Case does not matter but spelling does.
- The MOVE command starts with everything selected. Give it a base point and a destination as normal.
- Zoom to extents afterwards to confirm nothing unexpected came along.
Compatibility notes
1995, so written-for rather than tested-on. It builds a selection set by layer and drives MOVE, neither of which has changed, so it stands a reasonable chance on a current release.
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 moves geometry, so work on a copy the first time.
Download
| Name: | MLAYER |
| Description: | Move layer will move an entire layer as your selection set. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Paul Standing |
| File Size: | 1 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | Mlayer.zip |
Related routines
- Layer Tool — includes a Move option driven by picking rather than typing.
- Delete Layer — the same select-by-layer idea, aimed at removal.
- LayerMatch — find the layer name by picking an object first.