Layer change command

Layer change command

Anonymous
Not applicable
622 Views
1 Reply
Message 1 of 2

Layer change command

Anonymous
Not applicable

Hello!

 

In the autocad I used back at my old job, when I would type, for instance, "2" (without quotations), it would change to layer 2.

 

I dont think it was a lisp command, because I already imported all the ones that we had and I do not have this one.

I was wondering how they did it, so I can do it myself?

 

Thanks in advance,

ataro

0 Likes
Accepted solutions (1)
623 Views
1 Reply
Reply (1)
Message 2 of 2

ВeekeeCZ
Consultant
Consultant
Accepted solution

It must be a lisp. Something like this one.

 

(defun C:2 nil
  (if (tblsearch "LAYER" "Layer 2")
    (command "_.-LAYER" "_t" "Layer 2" "_u" "Layer 2" "_s" "Layer 2" "")
    (command "_.-LAYER" "_m" "Layer 2" ""))
  (princ)
)
0 Likes