(defun C:VPLayerNoPlot (/ a1 b1 index b1 ln) (command "-layer" "s" "0" "thaw" "*" "unlock" "*" "") (setq a1 (ssget "X" '((0 . "VIEWPORT")))) (setq n1 (sslength a1)) (setq index 0) (repeat n1 (setq b1 (entget (ssname a1 index))) (setq ln (cdr (assoc 8 b1))) (command "-layer" "p" "n" ln "");;Add semicolon at beginning of this line to disable setting layer to "noplot". ; (command "-layer" "f" ln "");;Remove semicolon at beginning of this line to enable layer "freeze". (setq index (1+ index)) ) (command "zoom" "extents") )