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

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

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

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

大家帮帮忙撒

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

highlight显示

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

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

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

用objectname判断

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

可否给段示例代码呢?麻烦

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

if ppentity.objectname="acdbline" then
msgbox "直线选中"
ppentity.color=acred      '改变COLOR
end if

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

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

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

object.Highlight HighlightFlag
Object
, , ,
The object or objects this method applies to.
HighlightFlag
Boolean; input-only
TRUE: The object is highlighted.
       
FALSE: The existing highlight is removed from the object.
       
Remarks
Once the highlight flag for an object has been set, a call to theormethod is required to view the change.
Note that this function does not return the current highlight status of an object.
      可以看出highlight不行的

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

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