Se7en, I was going to e-mail you this, but thought it would be great to have for the general public.
;;;=============================================================;
;;; FrozenLayerCollector ;
;;;-------------------------------------------------------------;
;;; Purpose: To keep a variable of frozen layer objects ;
;;; Arguments: None ;
;;; Returns: A vla-object list of all frozen layers passed in a ;
;;; variable called lay-list. ;
;;; ex:(#<VLA-OBJECT IAcadLayer 05470584> ;
;;; #<VLA-OBJECT IAcadLayer 05470484> ;
;;; #<VLA-OBJECT IAcadLayer 05470444> ;
;;; #<VLA-OBJECT IAcadLayer 054703a4> ;
;;; #<VLA-OBJECT IAcadLayer 054700d4>) ;
;;;-------------------------------------------------------------;
;;; Author: Daron Rogers ;
;;; Date: 09/23/03 ;
;;;=============================================================;
(defun frozenlayercollector (/ lay-list)
(setq lay-list nil)
(vlax-for each (vla-get-layers (get-active-document))
(cond ((= (vla-get-freeze each) :vlax-true)
(setq lay-list (append lay-list (list each)))
)
)
)
lay-list
)
I originally wrote this for Kate on cadalog.com. Later that same day, I needed a function that could remember what layers were frozen and be able to thaw them and then re-freeze them after scaling objects. It’s not the same as the one I wrote for her, but it is the basis for the idea.