;;;Modify the text style of a selection set of text entities. (uses USTR UKWORD) ;;; The only input required is the desired ;;; text width factor and selection of the text to modify. There ;;; is no need to worry about not selecting non-text entities ;;; because they will be automatically filtered out of the ;;; selection set. ;;; ;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 6-7-94 ;;;> EDITED: 07-07-2005 ;;; (DEFUN C:txtsty (/ tht tset tsln cntr tent edtw) ;(setq tsty (ustr 1 "\nText Style " (getvar"textstyle") nil)) (SETQ frsty (TBLNEXT "STYLE" T)) (IF ukword nil (LOAD "ukword" "\nFile UKWORD.LSP not loaded! ") ) ;_ end of if (IF ustr nil (LOAD "ustr" "\nFile USTR.LSP not loaded! ") ) ;_ end of if (SETQ tsty (ukword 1 "Current ?" (STRCAT "Change Text Style to Current=" (GETVAR "textstyle") " or ?" ) ;_ end of strcat "Current" ) ;_ end of ukword ) ;_ end of setq (IF (EQ tsty "?") (PROGN (PRINC (STRCAT "\nAvailable styles: " (CDR (ASSOC 2 frsty)) ", ") ) ;_ end of princ (WHILE (SETQ stylst (TBLNEXT "STYLE")) (SETQ stynam (CDR (ASSOC 2 stylst))) (IF (/= 16 (BOOLE 1 16 (CDR (ASSOC 70 stylst)))) (PRINC (STRCAT stynam ", ")) ) ;_ end of if ) ;while (PRINC "\010\010") (WHILE (NOT (TBLSEARCH "STYLE" tsty)) (SETQ tsty (ustr 1 "\nChange Text Style to" (GETVAR "textstyle") nil ) ;_ end of ustr ) ;_ end of setq (IF (NOT (TBLSEARCH "STYLE" tsty)) (PRINC (STRCAT "\nStyle " (STRCASE tsty) " not found!")) ) ;if ) ;while ) ;progn ) ;if (PROGN (IF (EQ tsty "Current") (SETQ tsty (GETVAR "textstyle")) ) ;if (PROMPT "\nSelect Text: ") (SETQ tset (SSGET '((-4 . "") ) ) ;_ end of ssget ) ;_ end of setq (IF tset (PROGN (SETQ tsln (SSLENGTH tset)) (SETQ cntr 0) ) ;_ end of progn ) ;_ end of if (WHILE (IF (AND (< cntr tsln) tset) (SETQ tent (ENTGET (SSNAME tset cntr))) ) ;if (PROGN (SETQ edtw (ENTGET (CDAR tent))) (IF (OR (EQ (CDR (ASSOC 0 edtw)) "TEXT") (EQ (CDR (ASSOC 0 edtw)) "ATTRIB") (EQ (CDR (ASSOC 0 edtw)) "ATTDEF") ) ;or (PROGN (SETQ edtw (SUBST (CONS 7 tsty) (ASSOC 7 edtw) edtw ) ;_ end of subst ) ;_ end of setq (ENTMOD edtw) ) ;_ end of progn ) ;_ end of if (SETQ cntr (1+ cntr)) ) ;_ end of progn ) ;_ end of while ) ;progn ) ;DEFUN ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ;*** DO NOT add text below the comment! ***|;