home *** CD-ROM | disk | FTP | other *** search
- ; CHANGE STYLE
- ; by BILL VALASKI, Jr. for Computer Projects Unlimited (CPU)
- ;
- ; This is an advanced lisp macro that changes the text STYLE of any TEXT
- ; items in the chosen selection set. The STYLE specified as the new style must
- ; be already loaded, otherwise no conversion will be done.
-
- (defun C:CHGSTYL (/ p NEWSTYL1 l n OLDSTYL NEWSTYL e)
- (setq CL 1) ;Set load bit on
- (setq p (ssget)) ;Get selection set
- (if p (progn
- (SETQ NEWSTYL1
- (GETSTRING "\nEnter the new text style: ")) ;New text style...
- (setq l 0)
- (setq n (sslength p))
- (while (< l n)
- (if (= "TEXT"
- (cdr (assoc 0
- (setq e (entget (ssname p l))))))
- (progn
- (SETQ NEWSTYL (CONS 7 NEWSTYL1)) ;Creates dotted pair
- (SETQ OLDSTYL (ASSOC '7 E))
- (ENTMOD (SUBST NEWSTYL OLDSTYL E))
- )
- )
- (setq l (1+ l))
- )
- ))
- )
-