;;;Change selection set color, linetype to BYLAYER and lineweight to Default. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 6-7-94 ;;;> EDITED: 01-08-2007 ;;; (DEFUN C:CE (/ eset) (SETVAR "cmdecho" 0) (SETQ ce_option (ukword 1 "Color LType LWidth CLT CLW LTLW All" "Entity Color, Linetype, Linewidth to BYLAYER options [Color LType LWidth CLT CLW LTLW All]" (IF ce_option ce_option "All" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq (SETQ eset (SSGET)) (IF eset (PROGN (COND ((EQ (STRCASE ce_option) "All") (COMMAND ".chprop" "p" "" "c" "bylayer" "lt" "bylayer" "lw" "bylayer" "")) ((EQ (STRCASE ce_option) "COLOR") (COMMAND ".chprop" "p" "" "c" "bylayer" "")) ((EQ (STRCASE ce_option) "LTYPE") (COMMAND ".chprop" "p" "" "lt" "bylayer" "")) ((EQ (STRCASE ce_option) "LWIDTH") (COMMAND ".chprop" "p" "" "lw" "bylayer" "")) ((EQ (STRCASE ce_option) "CLT") (COMMAND ".chprop" "p" "" "c" "bylayer" "lt" "bylayer" "")) ((EQ (STRCASE ce_option) "CLW") (COMMAND ".chprop" "p" "" "c" "bylayer" "lw" "bylayer" "")) ((EQ (STRCASE ce_option) "LTLW") (COMMAND ".chprop" "p" "" "lt" "bylayer" "lw" "bylayer" "")) ) ;_ end of COND (SETQ cnt 0) (WHILE (< cnt (SSLENGTH eset)) (SETQ this_ent (ENTGET (SSNAME eset cnt))) (IF (OR (EQ (STRCASE ce_option) "LType") (EQ (STRCASE ce_option) "CLT") (EQ (STRCASE ce_option) "LTLW") (EQ (STRCASE ce_option) "ALL") ) ;_ end of OR (IF (ASSOC 6 this_ent) (SETQ this_ent (APPEND (REVERSE (CDR (MEMBER (ASSOC 6 this_ent) (REVERSE this_ent)))) (CDR (MEMBER (ASSOC 6 this_ent) this_ent)) ) ;_ end of append ) ;_ end of setq ) ;_ end of if ) ;_ end of IF (IF (OR (EQ (STRCASE ce_option) "COLOR") (EQ (STRCASE ce_option) "CLT") (EQ (STRCASE ce_option) "CLW") (EQ (STRCASE ce_option) "ALL") ) ;_ end of OR (SETQ this_ent (SUBST (CONS 62 256) (ASSOC 62 this_ent) this_ent)) ) ;_ end of IF ;;; (IF (OR (EQ (STRCASE ce_option) "LWIDTH") ;;; (EQ (STRCASE ce_option) "CLW") ;;; (EQ (STRCASE ce_option) "LTLW") ;;; (EQ (STRCASE ce_option) "ALL") ;;; ) ;_ end of OR ;;; (SETQ this_ent (SUBST (CONS 370 -3) (ASSOC 370 this_ent) this_ent)); Sets LineWidth to "Default" ;;; ) ;_ end of IF ;;; (IF (OR (EQ (STRCASE ce_option) "LWIDTH") ;;; (EQ (STRCASE ce_option) "CLW") ;;; (EQ (STRCASE ce_option) "LTLW") ;;; (EQ (STRCASE ce_option) "ALL") ;;; ) ;_ end of OR ;;; (IF (ASSOC 370 this_ent) ;;; (SETQ this_ent (APPEND (REVERSE (CDR (MEMBER (ASSOC 370 this_ent) (REVERSE this_ent)))) ;;; (CDR (MEMBER (ASSOC 370 this_ent) this_ent)); Should Set LineWidth to "BYLAYER" but doesn't ;;; ) ;_ end of append ;;; ) ;_ end of setq ;;; ) ;_ end of if ;;; ) (ENTMOD this_ent) (SETQ cnt (1+ cnt)) ) ;_ end of while (IF (OR (EQ (STRCASE ce_option) "LWIDTH") (EQ (STRCASE ce_option) "CLW") (EQ (STRCASE ce_option) "LTLW") (EQ (STRCASE ce_option) "ALL") ) ;_ end of OR (PROGN (SETQ reset_lalw (ukword 1 "Yes No" "Reset all layer linewidths to \"Default\"? [Yes No]" (IF reset_lalw reset_lalw "No" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq (IF (EQ (STRCASE reset_lalw) "YES") (COMMAND ".-layer" "lw" "default" "*" "") ) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;defun (SETQ C:ICE C:CE) ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil nil T) ;*** DO NOT add text below the comment! ***|;