(defun C:txtlies (/) (setq MD_ERR *ERROR* *ERROR* M:FEHLER ) ;_ end of setq ;;Marke für Zurück nach Abbruch setzen (command "_UNDO" "_MARK") (setq as (ssx_fe)) (setq tt (ssget "x" as)) (setq txtdat "c:/temp/tmptxt.txt") (if (/= tt nil) (progn (repeat (sslength tt) (setq as (entget (ssname tt 0))) (setq txtis (cdr (assoc 1 as))) (setq dat (open txtdat "a")) (write-line txtis dat) (ssdel (cdr (assoc -1 as)) tt) ) ;_ end of repeat (close dat) (prompt (strcat " Der text steht in Datei " txtdat)) ) ;_ end of progn (prompt " Irgendwas war falsch!") ) ;_ end of if ) ;_ end of defun (prompt " Mit 'txtlies' starten") (defun M:FEHLER (S) (print (strcat "M:fehler " S)) (command "_UNDO" "_BACK") (setq *ERROR* MD_ERR) (princ) ) ;_ end of defun (defun ssx_fe (/ data fltr ent) (setq ent (car (entsel " Objekt auswählen : "))) (if ent (progn (setq data (entget ent)) (foreach x '(0 2 6 7 8 39 62 66 210) (if (assoc x data) (setq fltr (cons (assoc x data) fltr) ) ) ) (reverse fltr) ) ) )