;;;Isolates layer name specified through the symbol lname ;;;Thaws all frozen layers only if thawlayer is not NIL ;;;If lname is frozen it will not display if thawlayer is NIL ;;; ;;; Author: Henry C. Francis ;;; 425 N. Ashe St. ;;; Southern Pines, NC 28387 ;;; http://paracadd.com ;;; All rights reserved. ;;; ;;; COPYRIGHT: 6/2009 ;;; EDITED: 6/2009 ;;; ;;;================================================================================================== (DEFUN isolay (lname thawlayer / ) (SETQ layername_list (LIST (CDR (ASSOC 2 (TBLNEXT "LAYER" T))))) (WHILE (SETQ next_layername (TBLNEXT "LAYER" NIL)) (SETQ layername_list (APPEND layername_list (LIST (CDR (ASSOC 2 next_layername))))) ) ;_ end of WHILE (COMMAND "-layer" "off" "*" "y" "") (FOREACH n layername_list (PROGN (SETQ this_layent (TBLOBJNAME "LAYER" n)) ;_ end of SETQ (IF this_layent (PROGN (SETQ this_layentdef (ENTGET this_layent)) ;;; (IF (< (CDR (ASSOC 62 this_layentdef)) 0) ;;; NIL ;;; (PROGN (SETQ this_layentdef ;;; (SUBST (CONS 62 ;;; (- (ABS (CDR (ASSOC 62 this_layentdef))) ;_ end of ABS ;;; ) ;_ end of - ;;; ) ;_ end of CONS ;;; (ASSOC 62 this_layentdef) ;;; this_layentdef ;;; ) ;_ end of SUBST ;;; ) ;_ end of SETQ ;;; (ENTMOD this_layentdef) ;;; (ENTUPD (CDR (ASSOC -1 this_layentdef))) ;;; ;;; (PRINC (STRCAT "\n" n ": Off")) ;;; ;;; (PRINC) ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF (IF thawlayer (IF (EQ (BOOLE 1 (CDR (ASSOC 70 this_layentdef)) 1) 1) (PROGN (SETQ this_layentdef (SUBST (CONS 70 (1- (CDR (ASSOC 70 this_layentdef)))) ;_ end of CONS (ASSOC 70 this_layentdef) this_layentdef ) ;_ end of SUBST ) ;_ end of SETQ (ENTMOD this_layentdef) (ENTUPD (CDR (ASSOC -1 this_layentdef))) (VLA-REGEN (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)) ACALLVIEWPORTS) ;;; (PRINC (STRCAT "\n" n ": Thawed ")) ;;; (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of PROGN ) ;_ end of FOREACH (SETQ this_layent (TBLOBJNAME "LAYER" lname)) ;_ end of SETQ (IF this_layent (PROGN (SETQ this_layentdef (ENTGET this_layent)) (IF (> (CDR (ASSOC 62 this_layentdef)) 0) NIL (PROGN (SETQ this_layentdef (SUBST (CONS 62 (ABS (CDR (ASSOC 62 this_layentdef)))) ;_ end of CONS (ASSOC 62 this_layentdef) this_layentdef ) ;_ end of SUBST ) ;_ end of SETQ (ENTMOD this_layentdef) (ENTUPD (CDR (ASSOC -1 this_layentdef))) (PRINC (STRCAT "\n" lname ": Isolated " (IF (EQ (BOOLE 1 (CDR (ASSOC 70 this_layentdef)) 1) 1) "(but Frozen)" "" ) ) ) (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ) ;_ end of DEFUN ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil T T) ;*** DO NOT add text below the comment! ***|;