本帖最后由 xujinhua 于 2012-3-31 12:50 编辑
- (defun c:xu()
- (setq fln-2 (getstring "\n文件名:"))
- (if (= fln-2 "") (setq fln-2 "c:\\1"))
- (setq fln-1 (strcat fln-2 ".txt"))
- (setq file_id (open fln-1 "a"))
- (setq a (ssget))
- (setq n (sslength a))
- (setq index 0)
- (repeat n
- (setq el (entget ( ssname a index)))
- (setq index ( + index 1))
- (setq e (assoc 0 el))
- (if (= "DIMENSION" (cdr e))
- (progn
- (setq txt (cdr (assoc 42 el)))
- (princ txt file_id)
- (princ " " file_id)
- )
- )
- )
- (princ "\n" file_id)
- (close file_id)
- )
|