;;;Change attribute's height ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 3-16-2001 ;;;> EDITED: 01-25-2006 ;;; (defun c:attht () (setq modcnt 0) (if ustr nil (load "ustr" "\nFile USTR.LSP not loaded! ")) (if ureal nil (load "ureal" "\nFile UREAL.LSP not loaded! ")) (setq batname (strcase (ustr 1 "Block name for new attribute height? " (if batname batname "") nil))) (setq newattht (ureal 1 "" "New attribute height? " (if newattht newattht 0.0))) (setq bmss (ssget "x" (list (cons -4 "") ) ) ) (setq bmcnt (1- (sslength bmss))) (while (>= bmcnt 0) (setq bment (entget (ssname bmss bmcnt))) (while (/= (cdr(assoc 0 bment)) "SEQEND") (if (eq (cdr (assoc 0 bment)) "ATTRIB") (if (eq (setq modatthgt (ukword 1 "Yes No" (STRCAT "Change height of " (cdr (assoc 2 bment)))(if modatthgt modatthgt "No"))) "Yes") (progn (setq newent (subst (cons 40 newattht)(assoc 40 bment) bment)) (if (entmod newent) (setq modcnt (1+ modcnt)) ) (entupd (cdr(assoc -1 newent))) ) ) ) (setq bment (entget (entnext (cdr(assoc -1 bment))))) ) (setq bmcnt (1- bmcnt)) ) (princ (strcat "\nHeight set to " (rtos newattht 2 2) " for " (itoa modcnt) " attributes in " (itoa (sslength bmss)) " " batname " blocks.")) (princ) )