;;;Multiple attribute update subroutine (attupd [blockname] [attribname] [newvalue]) ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-22-97 ;;;> EDITED: 05-06-2001 ;;; (defun attupdm (blockname attribname newvalue / ttl1ss iniblk inient nxtent) (setq ttl_exst nil bstp 0) (if (setq ttl1ss (ssget ;"x" (list (cons -4 "") ) ) ;_ end of ssget ) ;_ end of setq (while (< bstp (sslength ttl1ss)) (progn (setq iniblk (ssname ttl1ss bstp)) (setq inient (entget iniblk)) (setq nxtent (entget (entnext iniblk))) (while (/= (cdr (assoc 0 nxtent)) "SEQEND") (if (eq (cdr (assoc 0 nxtent)) "ATTRIB") (if (eq (strcase(cdr (assoc 2 nxtent)))(strcase attribname)) (progn (setq nxtent (subst (cons 1 newvalue) (assoc 1 nxtent) nxtent) ) ;_ end of setq (entmod nxtent) (entupd iniblk) ) ;_ end of progn (if (eq (strcase(cdr (assoc 2 nxtent)))"SHT_NO.") (setq cur_sht_no (cdr(assoc 1 nxtent))) ) ) ;_ end of if ) ;_ end of if (setq nxtent (entget (entnext (cdar nxtent)))) ) ;_ end of while (princ) ) ;_ end of progn (setq bstp (1+ bstp)) ) (princ) ) ;_ end of if (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 0 0 0 T T nil T) ***Don't add text below the comment!***|;