wowolwj 发表于 2005-10-26 13:12:00

[求助]用例子的getSubentPathsAtGsMarker无法遍历子实体

<FONT face=宋体 size=2>今天用arx里的例子遍历region的各个边,发现只能找到一个边,为什么呢?<BR>ads_name sset;<BR>if (acedSSGet("_:S", NULL, NULL, NULL, sset) != RTNORM) {<BR>return Acad::eInvalidAdsName;<BR>}<BR><BR>struct resbuf *pRb;<BR>acedSSNameX(&amp;pRb, sset, 0);<BR>acedSSFree(sset);<BR>struct resbuf *pTemp;<BR>int i;<BR>for (i=1, pTemp = pRb;i&lt;3;i++, pTemp = pTemp-&gt;rbnext)<BR>{ ; }<BR>ads_name ename;<BR>ads_name_set(pTemp-&gt;resval.rlname, ename);<BR><BR>pTemp = pTemp-&gt;rbnext;<BR>marker = pTemp-&gt;resval.rint;<BR>acutRelRb(pRb);<BR><BR>acdbGetObjectId(objId, ename);<BR><BR>AcDbEntity *pEnt;<BR>acdbOpenAcDbEntity(pEnt, objId, AcDb::kForRead);<BR><BR>AcGePoint3d pickpnt;<BR>AcGeMatrix3d xform;<BR>int numIds;<BR>AcDbFullSubentPath *subentIds;<BR><BR>pEnt-&gt;getSubentPathsAtGsMarker(AcDb::kEdgeSubentType,<BR>marker, pickpnt, xform, numIds, subentIds);<BR>for( i = 0; i &lt; numIds; i++) {<BR>pEnt-&gt;highlight(subentIds);<BR><BR>pEnt-&gt;unhighlight(subentIds);<BR><BR>}<BR>delete []subentIds;<BR>pEnt-&gt;close();<BR>调试的时候发现numIds的值怎么是1呢?为什么只得到一个边?</FONT>
页: [1]
查看完整版本: [求助]用例子的getSubentPathsAtGsMarker无法遍历子实体