 ; Text/Attedf width change
 ; Copyright 1990, 1997 by Rocket Software
 ; Allows adjustment of the width scale factor without using fitted text
 ; or defining a new style.  Also useful with rotated text.
 (DEFUN C:WT ( / ss typ cc enam entt num lll lln zz tt)
  (setvar "cmdecho" 0)
  (command "undo" "m")
  (setq num 0)
  (prompt "Select text to change: ")
  (setq ss (ssget))
  (if ss
      (progn
          (setq typ (cdr (assoc 0 (entget (ssname ss 0)))))
          (if (or (= "TEXT" typ) (= "ATTDEF" typ))
              (setq tt (strcat "<"
                                (rtos (cdr (assoc 41 (entget (ssname ss 0)))))
                               "> New width factor or Return to select: "))
              (setq tt "New width factor or <Return> to select: "))
          (setq cc (getreal tt))
          (if (and (null cc)
                   (setq enam (car (entsel "Text of requisite width: ")))
                   (setq entt (entget enam)))
              (setq cc (cdr (assoc 41 entt))))
          (if cc
             (progn
                  (while (ssname ss 0)
                         (setq lll (ssname ss 0))
                         (setq lln (entget lll))
                         (setq typ (cdr (assoc 0 lln)))
                         (if (or (= "TEXT" typ) (= "ATTDEF" typ))
                             (progn
                                  (setq num (1+ num))
                                  (setq zz (cdr (assoc 41 lln)))
                                  (entmod (subst (cons 41 cc)
                                                 (cons 41 zz) lln))))
                         (ssdel lll ss))))
          (prompt (strcat "\nLines changed: " (itoa num)))
          (setq ss nil)))
 (princ))