BDYCAD 发表于 2006-7-26 14:41:00

ARX涵数取LISP参数请教

<P>我要在ARX中写一个Mypoint涵数然后在LISP这样用<BR>(Mypoint '(0.0 30) '(40 20))<BR>然后Mypoint涵数就会根据这些点画出R3的圆,&nbsp; 我下面红色的代码处出错,请教大家要怎么做才对呀? 谢谢</P>
<P>struct resbuf *pArgs =acedGetArgs () ;</P>
<P>&nbsp;&nbsp;// TODO: add your code here<BR>&nbsp;&nbsp;ads_point pt1, pt2;<BR>&nbsp;&nbsp;resbuf *tb;<BR>&nbsp;&nbsp;tb = pArgs;<BR><FONT color=#ff0000>&nbsp;&nbsp;pt1 = tb-&gt;resval.rpoint;<BR>&nbsp;&nbsp;tb = tb-&gt;rbnext;<BR>&nbsp;&nbsp;pt2 = tb-&gt;resval.rpoint;</FONT><BR>.............<BR></P>

sieben 发表于 2006-7-26 15:50:00

我也不懂,从数据库方面的经验去想,会不会在第一句"<FONT color=#ff0000>pt1 = tb-&gt;resval.rpoint;"</FONT><FONT color=#000000>前,tb还没有指向开始的位置<BR></FONT>

wzz1968 发表于 2006-7-27 15:33:00

<P><FONT color=#ff0000>pt1 = tb-&gt;resval.rpoint;</FONT><BR>---------------------------------</P>
<P>pt是数组,不能这样进行操作.</P>
<P>应该改为:</P>
<P><FONT color=#ff0000>pt1 = tb-&gt;resval.rpoint;<BR>pt1 = tb-&gt;resval.rpoint;</FONT></P>
<P><FONT color=#ff0000>pt1 = tb-&gt;resval.rpoint[Z};</FONT></P>
<P><BR><BR><BR>&nbsp;</P>
页: [1]
查看完整版本: ARX涵数取LISP参数请教