←  nanoCAD forum

nanoCAD forum

»

[Help] Layer except off lisp

hkgom's Photo hkgom 27 Jul 2018

is anyone have lisp for layer except off ?

i found layer off lisp however i coundnt find layer off except i selected layers

below command is for Autocad but it is not working promptly

(defun c:ww(/ ss n k en cly oly)
(setq ss (ssget))
(setq n (sslength ss))
(setq k 0)
(setq cly (cdr (assoc 8 (entget (ssname ss (1- n))))))
(command "layer" "s" cly "")
(command "layer" "off" "*" "" "")
(while (<= 1 n)
(setq en (ssname ss k))
(setq oly (cdr (assoc 8 (entget en))))
(command "layer" "on" oly "")
(setq n (- n 1))
(setq k (+ k 1))
)
(princ)
)


is there any method to change above command? or new command ?

Thanks
Quote