home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0000 - 0009 / ibm0000-0009 / ibm0003.tar / ibm0003 / ACAD10-1.ZIP / CHSTYLE.LSP < prev    next >
Encoding:
Text File  |  1989-02-01  |  895 b   |  33 lines

  1. ;    Routine:  CHANGE TEXT STYLE
  2. ;    Purpose:  To allow the user to change the heights of a window of text
  3. ;              at a time.
  4.  
  5. (defun c:chstyle ()
  6.    (setq txtwindow (ssget))
  7.    (if txtwindow
  8.       (progn
  9.      (setq newst (getstring  "\nEnter the new text style:   "))
  10.      (setq c 0 changed 0)
  11.      (setq len (sslength txtwindow))
  12.         (while (< c len)
  13.            (if (= "TEXT" (cdr (assoc 0 (setq entity (entget
  14.                       (ssname txtwindow c))))))
  15.          (progn
  16.             (setq oldst (cdr (setq st (assoc 7 entity))))
  17.             (setq entity (subst (cons 7 newst) st entity))
  18.             (entmod entity)
  19.             (setq changed (1+ changed))
  20.          )
  21.            )
  22.            (setq c (1+ c))
  23.         )
  24.       )
  25.    )
  26.    (Princ "Changed the heights of ")
  27.    (Princ changed)
  28.    (Princ " text lines.")
  29.    (setq txtwindow nil newst nil st nil oldst nill changed nil c nil len nil entity nil
  30.    )
  31.    (terpri)
  32. )
  33.