- (defun c:EXT (/ flnm fn s n index ents ent txt)
- (setq flnm (getstring "\nFile name:"))
- (setq fn (open flnm "w"))
- (setq s (ssget '((0 . "*TEXT"))))
- (setq n (sslength s))
- (setq index ( - n 1))
- (repeat n
- (setq ents (entget (ssname s index)))
- (setq index ( - index 1))
- (setq txt (cdr (assoc 1 ents)))
- (write-line txt fn)
- )
- (close fn)
- )
- (princ "\n文本导出:EXT")
|