Hi all,
I am looking for a Set Layer lisp routine. I would like to be able to click a layer and the routine to make it current.
Thanks in advance. Phil
Hi all,
I am looking for a Set Layer lisp routine. I would like to be able to click a layer and the routine to make it current.
Thanks in advance. Phil
If you mean by selecting an object, try ai_molc, the built-in routine.
If you mean by some other method, what exactly do you mean?
LSET will do that:
(defun c:lset (/ a2 bw l1 l2) (setvar "CMDECHO" 0) (prompt "Select entity on target layer") (terpri) (setq a2 (entsel)) (setq b2 (entget (car a2))) (setq l1 (assoc 8 b2)) (setq l2 (cdr l1)) (command "layer" "s" l2 "") (princ) )
(I don't have any credits for this thing and don't know who wrote it.)
AutoCAD already has the "Make Object's Layer Current" button which does that. If you want more features, like turning on or thawing a layer and making it current, try the PRO Menu trial version, at the link below.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required