有两件事它不是一个“表格”,而是围绕文本的行,尝试对对象使用正确的措辞,这样更容易提供响应。
这应该很接近了。它确实在excel中的Y上有一个额外的步骤排序,但它是在2004年完成的
- ; converts column of text to comma seprated file with text value and y value
- ; put in excell and sort by y value
- ; by Alan H Nov 2004
- (setq x 1)
- (while (/= x 4)
- (setq howmany (rtos x 2 0))
- (setq fileto (strcat "c:/temp/setout" howmany))
- (princ fileto)
- (setq fout (open fileto "w"))
- (while (not (setq ss (ssget ))))
- (princ "wow")
- (while (setq en (ssname ss 0))
- ; Entity type
- (setq entyp (cdr (assoc 0 (entget en))))
- (princ "wow")
- (if (= entyp "TEXT")
- (progn
- (setq xyz (cdr (assoc 10 (entget en))))
- (setq txtht (cdr (assoc 1 (entget en))))
- ;write file out here
- (setq textout (strcat txtht "," (rtos (cadr xyz) 2 3)))
- ;write
- (write-line textout fout)
- (princ textout)
- )
- )
- ; Delete each measured entity from set
- (ssdel en ss)
- ;end while
- )
- (close fout)
- (setq x (+ x 1))
- ) ;end if loop 3 times
- (princ)
|