Author Topic: frozen layer collector  (Read 3425 times)

0 Members and 1 Guest are viewing this topic.

daron

  • Guest
frozen layer collector
« on: September 24, 2003, 06:00:19 PM »
Se7en, I was going to e-mail you this, but thought it would be great to have for the general public.
Code: [Select]
;;;=============================================================;
;;; 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.

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9227
frozen layer collector
« Reply #1 on: September 24, 2003, 06:42:05 PM »
Thats saweeet man.  Thanks for sharing.
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

daron

  • Guest
frozen layer collector
« Reply #2 on: September 24, 2003, 06:51:24 PM »
Sounds like something you were telling that other guy on vbdesign, who wants to have a layer previous routine.