;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;幕匠LISP实验室;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;程序功能：全局修改文字  [备注：]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN C:MJ149 (/ f sel el e txt pt1 rot sty high hb col)
   (setvar "CMDECHO" 0)
   (setq f (open "hz" "w"))
   (setq sel (ssget))
   (if (/= nil sel)
     (progn
       (setq el (entget (ssname sel 0)))
       (setq e (assoc 0 el))
       (if (= "TEXT" (cdr e))
         (progn
           (setq txt (cdr (assoc 1 el)))
           (write-line (strcat " " txt) f)
           (close f)
           (setq pt1 (assoc 10 el))
           (setq pt1 (cdr pt1))
           (setq rot (assoc 50 el))
           (setq rot (cdr rot))
           (setq rot (/ (* rot 180) pi))
           (setq sty (assoc 7 el))
           (setq sty (cdr sty))
           (setq high (assoc 40 el))
           (setq high (cdr high))
           (setq hb (assoc 41 el))
           (setq hb (cdr hb))
           (setq col (assoc 62 el))
           (setq col (cdr col))
           (command "erase" sel "")
           (command "shell" "edit hz")
           (setq f (open "hz" "r"))
           (command "color" col)
           (command "style" sty "" 0 hb "" "" "" "")
           (command "text" "s" sty ^c)
           (setq txt (read-line f))
           (command "text" pt1 high rot (substr txt 2))
           (close f)
           (command "shell" "del hz")
         )
         (princ "\nError: not a text !")
       )
     )
   )
   (graphscr)(princ)
)
