CAD Forums > CAD General

Freeze Off Layers Routine

(1/1)

ronjonp:
I Know I've seen this somewhere.....

Lisp that finds all layers that are turned off and freezes them. Anyone here got it?

Thanks,

Ron :D

Keith™:
Well... it leaves them off but it freezes them as well.... Not sure about use with viewports...

--- Code: ---
(defun C:layfrzoff( / lay layname laylist)
  (setq lay (tblnext "layer" t))
  (while lay
    (setq layname (cdr (assoc 2 lay)))
    (if (<(cdr (assoc 62 (tblsearch "layer" layname))) 0)
      (progn
        (setq laylist (entget (tblobjname "layer" (cdr (assoc 2 lay)))))
(entmod (subst (cons 70 1) (assoc 70 laylist) laylist))
      )
    )
    (setq lay (tblnext "layer"))
  )
)

--- End code ---

ronjonp:
Thanks Keith...that worked excellent!

Keith™:
You are quite welcome...

Navigation

[0] Message Index

Go to full version