[求助]如何通过图元获取图元所在的编组
<p>请教,我有一些图元,这些图元其中有些是有编组的。</p><p>我如何通过选择其中一个图元获取它所在的编组呢!?</p>
<p> </p>
<p>对于DBDictionary这块不熟悉。麻烦知道的那位给个例子,或者指个道!</p>
<p>谢谢啊!</p> <p>搜下前段时间的好评贴,有这样内容的</p> <p>谢谢版主,看到那个贴了,那个贴的基本思路就是遍历所有Groups,直到找到包含所选图元的组了就退出。最坏的打算就是最后一个包含该图元!</p>
<p> </p>
<p>那么,就图元本身而言,不是有个ExtensionDictionary吗?那个里面返回来的内容不包含组的信息吗?</p>
<p> </p>
<p>lisp里面一个图元的102组吗之间,330那个组码就是图元所在的组! .Net可以获取这样的信息吗?</p>
<p> </p>
<p>
<table class="ruled" cellspacing="0" cellpadding="0">
<tbody>
<tr class="RuledOddRow">
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cdd"></a>
<p class="table-body">102</p></td>
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cdc"></a>
<p class="table-body">Start of persistent reactors group; always “{ACAD_REACTORS” (persistent reactors group appears in all dictionaries except the main dictionary)</p></td></tr>
<tr class="RuledEvenRow">
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cdb"></a>
<p class="table-body">330</p></td>
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cda"></a>
<p class="table-body">Soft-pointer ID/handle to owner dictionary. For GROUP objects this is always the ACAD_GROUP entry of the named object dictionary</p></td></tr>
<tr class="RuledOddRow">
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cd9"></a>
<p class="table-body">102</p></td>
<td class="table-body"><a name="WSfacf1429558a55dec759ddffb0eba947-5cd8"></a>
<p class="table-body">End of persistent reactors group, always “}”</p></td></tr></tbody></table></p> <p>看完那个帖子哈</p>
<p><font face="Verdana"><a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=78963&star=1#37398">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=78963&star=1#37398</a></font></p>
<p> </p> <p>哦,是哦!</p>
<p>这个我开始看完了!没看明白。就没太在意。</p>
<p>最后这个,就是我说的那个意思了!!!谢谢版主!!</p> <p>if (Pdbobj.GetType().ToString().Replace("Autodesk.AutoCAD.DatabaseServices.", "") == "Group")<br/></p>
<p>VB里面不是,Typeof Pdbobj is Group 就行了把!</p> <p>没错</p>
<p>这样写更好</p> Pdbobj.GetType().ToString()这个不会返回组信息吧,它返回的应该是所选图元的类型
页:
[1]