|
楼主 |
发表于 2011-10-8 11:34
|
显示全部楼层
yuyjy 发表于 2011-10-4 14:55
就这个文件!
这个试一下。。。。。。- (defun c:gwzxy ()
-
- (setq ffn (getfiled "选取文件" "D:/temp/" "txt" 1))
-
- (setq ff (open ffn "w"))
-
- (close ff)
-
-
-
- (setq ss (ssget '((0 . "text"))))
-
- ;;(setq ss (ssget '((0 . "text")(8 . "jzmj"))))
-
- (setq i 0)
-
-
-
-
- (repeat (sslength ss)
-
- (setq ssn (ssname ss i)
-
- endata (entget ssn)
-
- new_pp (cdr (assoc 1 endata))
-
- new_xyz (cdr (assoc 10 endata))
-
- )
-
- (setq ff (open ffn "a"))
-
- (princ new_xyz ff)
-
- (princ " " ff)
-
- (princ new_pp ff)
-
- (princ "\n" ff)
-
- (close ff)
-
- (setq i (1+ i))
-
- )
-
- )
复制代码 |
|