[Search tip detail and code files using keywords, tip number, author name, etc ]
Make Layers via the Keyboard
Tip# 3379 By Bill Neuhauser On 22-Mar-2010
Rated By 3 users
Categories : Layer Manager
Software type : AutoCAD 2010
Rename File To : No Files to download.
Create a new layer using only the keyboard.

Tipster Bill Neuhauser gives us a quick keyboard-only method for creating a new layer.

"If you just want to create a new layer and make it current, how about trying the old-fashioned way? On the Command line, type the following, pressing Enter after each item:

  • -LA
  • M
  • "new layer name" 

Finally, press Escape. The hands are quicker than the eyes — the new layer is now created and current!"

Notes from Cadalyst Tip Patrol: Typing a hyphen (-) in front of a keyboard command starts the command without a dialog box. It can be done with many commands. This is a good method to use when invoking commands in a LISP routine, or to start a command in a toolbar button. Entering M tells the Layer Manager command that you want to make a new layer. It will default to a color of white and a continuous linetype. You can set the color by typing C and picking a color, then entering the name of the layer you want to assign that color to, all before leaving the –LA command. The prompt will default to the current layer. Do the same with linetype, and all the other settings.


Average Rating:

User comments
Comment by Thompson,David
Posted on 2010-03-23 08:46:41
I knew this (buried deep in my old memory banks); it's very nice to be reminded of some of these old, simple, and quick ways of doing things. I often need to create a quick layer (sometimes temporary); and, this is a great way to do it. Thanks for bringing it back to the top of my memory banks.
Comment by Anonymous
Posted on 2010-03-23 15:10:48
This is also a great way to force a specified layer to be used in a program. It still works to use the "Make" even if the layer already exists in the drawing. The layer that you define becomes the current layer. Then if you set a variable to the old layer, you can return the user to his previous layer when he is done with the program. In a program it would look more like this: (command "layer" "m" "DIM" "c" "2" "" "lt" "continuous" "" "")