(DEFUN C:EXPTXT ()
(SETQ CL (GETVAR "CLAYER") TZ (GETVAR "TEXTSIZE") TY (GETVAR "TEXTSTYLE"))
(SETQ CU 0 JG 1)
(WHILE (= CU 0)
(setq sl (entget (car (entsel))))
(setq EN (cdr (assoc 0 sl)))
(IF (= EN "TEXT") (SETQ CU 1000))
)
(SETQ LA (CDR (ASSOC 8 SL)) ANG (CDR (ASSOC 50 SL)) TH (CDR (ASSOC 40 SL))
 TS (CDR (ASSOC 7 SL)) P1 (CDR (ASSOC 10 SL)) SB (CDR (ASSOC 1 SL))
)
(SETQ AG (ANGTOS ANG 0 2) TL (STRLEN SB))
(WHILE (<= JG TL)
(SETQ TX (SUBSTR SB JG 1))
(COMMAND "STYLE" TS "" "0" "1" "0" "N" "N" "N" )
(COMMAND "TEXT" P1 TH AG TX )
(SETQ P1 (POLAR P1 ANG TH))
(SETQ JG (+ JG 1))
)
(SETVAR "TEXTSIZE" TZ)
(COMMAND "STYLE" TY "" "0" "1" "0" "N" "N" "N" )
)
