麻烦高手们帮个忙!!!!!
<P>以前班主曾编了这样的程序:</P><P style="WORD-BREAK: break-all; LINE-HEIGHT: 12pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: black">(defun c:Getpt( / ss i ents f filename str)<BR> (defun getnum(i)<BR> (if (< 10)<BR> (setq val (strcat "J0" (rtos i)))<BR> (setq val (strcat "J" (rtos i)))<BR> )<BR> val)<BR> <BR> (setq ss (ssget '((0 . "LWPOLYLINE"))))<BR> (setq filename (getfiled "打开存放数据的Excel电子表格文档" "e:\\wjh\\study\\autolisp\\zhongguola\\" "XLS" 1))<BR> (setq f (open filename "w"))<BR> (setq i 0)<BR> (repeat (sslength ss)<BR> (setq ents (entget (ssname ss i)))<BR> (setq ents (mapcar 'cdr (vl-remove-if-not '(lambda(e) (= (car e) 10)) ents)))<BR> (setq i (1+ i))<BR> )<BR> (princ)<BR> (setq i 0)<BR> (repeat (length ents)<BR> (setq item (nth i ents))<BR> (if (> i 0)<BR> (setq str (strcat (getnum i)"\t"(rtos (distance item (nth (1- i) ents)) 2 2) "\t"(rtos (cadr item) 2 3)"\t"(rtos (car item) 2 3)"\t""水泥"))<BR> (setq str (strcat (getnum i)"\t""\t"(rtos (cadr item) 2 3) "\t"(rtos (car item) 2 3)))<BR> )<BR> (if (= (rem i 27) 0)<BR> (write-line (strcat "\n点号""\t""距离""\t""纵坐标(X)""\t""横坐标(Y)""\t""界桩材料""\t""备注") f)<BR> )<BR> ;(princ "\n")<BR> (write-line str f)<BR> (setq i (1+ i))<BR> )<BR> (close f)<BR> (princ)<BR>)</P><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我运行此程序将<FONT face="Times New Roman">cad</FONT>中的数据保存到电子表格中就成了如<FONT face="Times New Roman">:</FONT>电子表格样本<FONT face="Times New Roman">(</FONT>一<FONT face="Times New Roman">)</FONT>那样了<FONT face="Times New Roman">,</FONT>但是由于工作的需要<FONT face="Times New Roman">,</FONT>我需要的是电子表格<FONT face="Times New Roman">(</FONT>二<FONT face="Times New Roman">)</FONT>的样式<FONT face="Times New Roman">,</FONT>所一恳请编程的高手在这个程序的基础上在改编一下<FONT face="Times New Roman">.</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3>要求<FONT face="Times New Roman">:</FONT>和样本<FONT face="Times New Roman">(</FONT>二<FONT face="Times New Roman">)</FONT>的样式一样<FONT face="Times New Roman">,</FONT>行高<FONT face="Times New Roman">,</FONT>列宽都相同<FONT face="Times New Roman">,</FONT>且每个表格只能存放<FONT face="Times New Roman">27</FONT>个电的坐标值<FONT face="Times New Roman">.(</FONT>两个表格交接处距离一列的写入一定要留意<FONT face="Times New Roman">)</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3>麻烦各位高手了<FONT face="Times New Roman">!</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3>谢谢大家<FONT face="Times New Roman">!!!!!!<o:p></o:p></FONT></FONT></P>
<P style="WORD-BREAK: break-all; LINE-HEIGHT: 12pt"></o:p></SPAN> </P></SPAN> 为什么这么久了,还没有一位高手肯站出来说句话呀??????? <P>看来你要寂寞相守了!!!!</P>
<P>还是忍着点儿吧!!!!!</P>
页:
[1]