jkbanana 发表于 2008-1-11 13:06:00

用ObjectARX时,先选择后执行有没有问题?

<p>我是用VB的,对ObjectARX不了解。</p><p>在用VB时,如先选择实体后执行命令,常常会产生接口错误,</p><p>即时用VB获得AutoCAD的Pickfirst选择集时,产生错误。</p><p>不知道用ObjectARX时有没有这种问题?</p>

easypower 发表于 2008-1-13 14:18:00

应该没有这种问题

Sayonana 发表于 2008-1-16 13:55:00

肯定没有的啦.

jkbanana 发表于 2008-2-21 21:57:00

<p>运行了以下的程序,没有发现问题。</p><p>看来,今后还是要用ObjectARX C++来开发AutoCAD的应用程序。</p><p></p><p>static void test_pickfirst(void)<br/>&nbsp;{<br/>&nbsp;&nbsp;ads_name ssname, ent;<br/>&nbsp;&nbsp;long nssmem, i;<br/>&nbsp;&nbsp;struct resbuf *ebuf, *eb;<br/>&nbsp;&nbsp;// Get the current PICKFIRST set, if there is one; <br/>&nbsp;&nbsp;// otherwise, ask the user for a general entity selection. <br/>&nbsp;&nbsp;if (acedSSGet(NULL, NULL, NULL, NULL, ssname)!= RTNORM) {<br/>&nbsp;&nbsp;&nbsp;&nbsp; return;<br/>&nbsp;&nbsp;}<br/>&nbsp;&nbsp;if (acedSSLength(ssname, &amp;nssmem) != RTNORM) {<br/>&nbsp;&nbsp;&nbsp;&nbsp; return;<br/>&nbsp;&nbsp;}<br/>&nbsp;&nbsp;acutPrintf(_T("\n %ld\n"),nssmem);</p><p>&nbsp;&nbsp;for (i=0; i&lt;nssmem; i++){<br/>&nbsp;&nbsp;&nbsp;if (acedSSName(ssname, i, ent) != RTNORM){<br/>&nbsp;&nbsp;&nbsp;&nbsp;acdbFail(_T("\nFail\n")); <br/>&nbsp;&nbsp;&nbsp;&nbsp;return;<br/>&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;ebuf = acdbEntGet(ent); <br/>&nbsp;&nbsp;&nbsp;for (eb = ebuf; eb != NULL; eb = eb-&gt;rbnext) {<br/>&nbsp;&nbsp;&nbsp;&nbsp;printdxf(eb); //1. To print the dxf code of the entity(defined in other file.cpp)<br/>&nbsp;&nbsp;&nbsp;}<br/>&nbsp;&nbsp;&nbsp;acutRelRb(ebuf); <br/>&nbsp;&nbsp;}<br/>&nbsp;&nbsp;acedSSFree(ssname);<br/>&nbsp;}</p>

游戏人间 发表于 2012-2-23 15:52:09

我咋没看见有pickfirst这类的语句呢!

hgf876 发表于 2012-2-23 19:12:34

在帮助文档中查看下面的文字
ACRX_CMD_USEPICKSET
会有答案
页: [1]
查看完整版本: 用ObjectARX时,先选择后执行有没有问题?