[新手求助]怎样在VBA中判断图形被选中!
怎样在VBA中判断图形被选中,如直线,长方形,等是否被选中.先谢谢各位了. <p>大家帮帮忙撒</p> <p>highlight显示</p> <p>谢谢版主,看了一下,但是不知道怎么用呢?怎么判断直线是被选中状态?拜求</p> 用objectname判断 <p>可否给段示例代码呢?麻烦</p> <p>if ppentity.objectname="acdbline" then</p><p>msgbox "直线选中"</p><p>ppentity.color=acred '改变COLOR</p><p>end if</p> <p>alin说得对,可以highlight显示。</p><p>AcadEntity.Highlight(True)</p> <p class="syntax">object.Highlight HighlightFlag </p><p class="element">Object</p><p class="element-desc"><a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/all_drawing_objects.htm">All Drawing Objects</a>, <a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/idh_selectionset_object.htm">SelectionSet</a>, <a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/idh_attributeref_object.htm">AttributeReference</a>, <a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/idh_group_object.htm">Group</a><br/>The object or objects this method applies to. </p><p class="element">HighlightFlag</p><p class="element-desc">Boolean; input-only </p><p class="Constant">TRUE: The object is highlighted.</p><p class="Constant">FALSE: The existing highlight is removed from the object.
</p><p class="Heading-2">Remarks </p><p class="body">Once the highlight flag for an object has been set, a call to the <a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/idh_update.htm">Update</a> or <a href="mk:@MSITStore:D:\SMALL%20TOOLS\AutoCad%202004\help\acadauto.chm::/idh_regen.htm">Regen</a> method is required to view the change. </p><p class="body">Note that this function does not return the current highlight status of an object. </p><p class="body"></p><p class="body"></p><p class="body"> 可以看出highlight不行的</p> <p> vba 好像实现不了这个</p><p></p>
页:
[1]