I'll be glad when this insomnia wears off, I'd like to go to bed.
This is a fairly easy task to accomplish. Definitely something anyone could accomplish with a little work.
Hope this helps.BTW, I think this can be accomplish in the layer manager, but I'm not sure, I never open it.
Code:;;; Invert on/off and freeze/thaw state of all layers in drawing ;;; Alan J. Thompson, 09.14.09 (defun c:LayerInvert (/ #Doc) (vl-load-com) (vlax-for x (vla-get-Layers (setq #Doc (vla-get-activedocument (vlax-get-acad-object)) ) ;_ setq ) ;_ vla-get-Layers ;; invert on/off state (vl-catch-all-apply 'vla-put-layeron (list x (if (eq (vla-get-layeron x) :vlax-true) :vlax-false :vlax-true ) ;_ if ) ;_ list ) ;_ vl-catch-all-apply ;; invert freeze/thaw state (vl-catch-all-apply 'vla-put-freeze (list x (if (eq (vla-get-freeze x) :vlax-true) :vlax-false :vlax-true ) ;_ if ) ;_ list ) ;_ vl-catch-all-apply ) ;_ vlax-for (vla-regen #Doc acActiveViewport) (princ) ) ;_ defun




Reply With Quote
BTW, I think this can be accomplish in the layer manager, but I'm not sure, I never open it.

Bookmarks