(defun c:46() (setq ffn (getfiled "Export the specify texts" "D:/perfiles/LISP/homecom/" "lsp" 1)) (princ "\nSelect the texts...") (setq ss (ssget)) (setq ff (open ffn "w")) (setq n (sslength ss)) (setq i 0 ) (repeat n (setq ssn (ssname ss i)) (setq ssdata (entget ssn)) (setq sstyp (cdr (assoc 0 ssdata))) (if (= sstyp "TEXT") (progn (setq txt (cdr (assoc 1 ssdata))) (write-line txt ff) ) ) (setq i (1+ i)) ) (close ff) (princ (strcat "\nExport the file to===>>" ffn)) (command "notepad" ffn) (prin1) ) -------------------- 可以在出现选择提示后,输入F 进行栏选! |