Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Command to activate one layer

11 REPLIES 11
Reply
Message 1 of 12
Udins
1660 Views, 11 Replies

Command to activate one layer

 

Hi, 

 

Is there any command to choose just one layer we want to activate (not choose by click the mouse).. for example I want to activate the blue layer, i think it can be faster if I type rather than click it.. *beginner*

 

Capture.JPG

11 REPLIES 11
Message 2 of 12
Kent1Cooper
in reply to: Udins

With that list pulled down, type the first letter and the Layer gets sort of semi-highlighted; hit Enter.  That works for me in a trial in Acad2016.

Kent Cooper, AIA
Message 3 of 12
Udins
in reply to: Kent1Cooper

it works while the layer pulled down like you say Mr. Kent .. but how we choose if the list is not pulled down ? .. sorry for my strange question.
Message 4 of 12
Kent1Cooper
in reply to: Udins


@Udins wrote:
it works while the layer pulled down like you say Mr. Kent .. but how we choose if the list is not pulled down ? .. sorry for my strange question.

Well, it would probably take longer, but you can type -LA [with the hyphen prefix], which will bring up the command-line version of the Layer command, then type S for Set, the Layer name, and an extra Enter to end the command.  But in that way of doing it, you have to type the entire Layer name.

 

Or, for a limited number of Layer names, you could define little commands that would make the appropriate one current.  For example:

 

(defun C:BI () (setvar 'clayer "biru"))

 

Write a bunch of those, in a .lsp file, and load it, and you can type BI and it will set the BIRU Layer current.

Kent Cooper, AIA
Message 5 of 12
Udins
in reply to: Kent1Cooper


@Kent1Cooper wrote:

With that list pulled down, type the first letter and the Layer gets sort of semi-highlighted; hit Enter.  That works for me in a trial in Acad2016.


 

Thanks for your kindly answer .. but I prefer to choose your answer as I quotted above. I'm not interested in autolisp yet for this time .. because am still reinforce my skill in 2D .. 

Message 6 of 12
jackshield
in reply to: Kent1Cooper

USED A LISP LIKE THAT BACK IN THE DAY WHEN OUR LAYERS WHERE NAMED "1" - "8"

JUST HIT THE NUMBER AND ENTER

Message 7 of 12
jackshield
in reply to: Udins

YOU GOT TWO CLICKS TO ACTIVATE THAT LAYER

A LISP WOULD REQUIRE YOU TYPE THE NAME

 

FOR MY MONEY, THAT IS THE QUICKEST WAY

Message 8 of 12
GrantsPirate
in reply to: Udins

The icon for the LAYMCUR command is right there beside the layer pull down.  Pick on any object, pick that icon, done.

 

Misread your question, ignore above.

 

With the right INPUTSEARCHOPTIONS settings you can type in the command line a few letters of a layer and then pick from the list shown, or pick the only one that matches.


GrantsPirate
Piping and Mech. Designer
EXPERT ELITE MEMBER
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.

Message 9 of 12
m.vanwinsen
in reply to: GrantsPirate

You could make your own toolbar with buttons by entering the CUI? Then you will get your layer with the push of one button. 

Message 10 of 12
jggerth1
in reply to: m.vanwinsen

heck,  just type:

 

-LAYER <enter>

<enter>

name_of_layer <enter>

<enter>

 

 

no clicks needed....

Spoiler
 
Message 11 of 12
pendean
in reply to: jggerth1

heck, unpgraded, just type:

-LAYER <enter>
M <enter>
name_of_layer <enter>
<enter>
Message 12 of 12
Kent1Cooper
in reply to: pendean


@pendean wrote:
....
-LAYER <enter>
M <enter>
name_of_layer <enter>
<enter>

That was my suggestion at the beginning of Post 4, except for my using the command alias [saves three whole keystrokes!] and using the Set option rather than Make.  The Make option is good if the Layer may not already exist in the drawing, because it will create it if needed, but simply set it current if it's there already.  But the disadvantage I see with it is that if the Layer you want is in the drawing, but you happen to mis-type the name in any way, you'll end up [perhaps unwittingly] in an unwanted and extraneous Layer.  If you use the Set option, it will inform you if you mis-type an existing Layer name [and also if the Layer doesn't exist].

 

In any case, I think they were after something quicker than all that typing, and I would guess just the basic pull-down-list approach would usually be quicker.  They didn't explain why they initially seemed to want to do it without pulling down the list, but Post 5 sounds like they're resigned to that way of doing it.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost