CHENBIN12 发表于 2007-8-30 21:40:00

[新手求助]怎样在VBA中判断图形被选中!

怎样在VBA中判断图形被选中,如直线,长方形,等是否被选中.先谢谢各位了.

CHENBIN12 发表于 2007-8-31 18:59:00

<p>大家帮帮忙撒</p>

alin 发表于 2007-9-2 20:43:00

<p>highlight显示</p>

CHENBIN12 发表于 2007-9-3 21:46:00

<p>谢谢版主,看了一下,但是不知道怎么用呢?怎么判断直线是被选中状态?拜求</p>

天龙八部 发表于 2007-9-5 18:21:00

用objectname判断

CHENBIN12 发表于 2007-9-6 19:56:00

<p>可否给段示例代码呢?麻烦</p>

天龙八部 发表于 2007-9-8 14:50:00

<p>if ppentity.objectname="acdbline" then</p><p>msgbox "直线选中"</p><p>ppentity.color=acred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'改变COLOR</p><p>end if</p>

qxz 发表于 2007-9-13 23:39:00

<p>alin说得对,可以highlight显示。</p><p>AcadEntity.Highlight(True)</p>

alphasxb 发表于 2007-9-18 16:18:00

<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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 可以看出highlight不行的</p>

alphasxb 发表于 2007-9-18 16:22:00

<p>&nbsp;&nbsp;&nbsp; vba 好像实现不了这个</p><p></p>
页: [1]
查看完整版本: [新手求助]怎样在VBA中判断图形被选中!