;;; Change width factor for selected texts
;;; Saved from: http://www.cadtutor.net/forum/showthread.php?37230-Match-Text-Height-Width-amp-Oblique&highlight=MATCH+TEXT

(defun c:cw (/ ennyi23 wb23 shell23 loui23 el23)
(initget 7)
(prompt "\nSelect text(s).... ")
(command "select" "au" pause)
(setq ennyi23 (ssget "p"))
(setvar "cmdecho" 0)
(initget 7)
(setq wb23 (getdist "\nEnter New Width Factor: "))
(setq shell23 (sslength ennyi23))
(prompt "\nChanging width of selected texts... stand by.")
(command "undo" "mark")
(setq loui23 0)
(while (< loui23 shell23)
(setq el23 (entget (ssname ennyi23 loui23)))
(if (= "TEXT" (cdr (assoc 0 el23)))
(progn
(setq el23 (subst (cons 41 wb23) (assoc 41 el23) el23))
(entmod el23)
)
)
(setq loui23 (1+ loui23))
)
(setvar "cmdecho" 1)
(princ)
)
(c:cw)

Advertisements