jimzhoujim 发表于 2008-8-3 10:12:00

为什么没有handle

<p>Sub jim()<br/>Dim m As Integer<br/>Dim sel1 As AcadSelectionSet<br/>Dim sel2 As AcadSelectionSet<br/>Dim first As Variant</p><p>Set sel1 = ThisDrawing.SelectionSets.Add("TEST1_Sjsh")<br/>sel1.SelectOnScreen<br/>Set first = ThisDrawing.SelectionSets.Item("TEST1_Sjsh")</p><p>Dim handle1 As Variant<br/>handle1 = first.Handle<br/>sel1.Delete<br/>End Sub</p><p>我对first和handle1添加了监视,怎么first里面没有handle的属性呢?难道first不是object吗?请大家指教</p>

yellocea 发表于 2008-8-3 10:41:00

<div style="WIDTH: 728px; HEIGHT: 90px;"><script type="text/javascript"></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-7471407183047897&amp;dt=1217730768796&amp;lmt=1217730768&amp;prev_fmts=728x90_as%2C120x90_0ads_al_s&amp;output=html&amp;slotname=8773890557&amp;correlator=1217730768609&amp;url=http%3A%2F%2Fwww.mjtd.com%2FBBS%2Fdispbbs.asp%3FboardID%3D4%26ID%3D69376%26page%3D1&amp;ref=http%3A%2F%2Fwww.mjtd.com%2FBBS%2Findex.asp%3Fboardid%3D4&amp;frm=0&amp;cc=100&amp;ga_vid=1513236556.1217509049&amp;ga_sid=1217728782&amp;ga_hid=454191265&amp;ga_fc=true&amp;flash=9.0.124.0&amp;u_h=900&amp;u_w=1440&amp;u_ah=870&amp;u_aw=1440&amp;u_cd=32&amp;u_tz=480&amp;u_his=12&amp;u_java=true" frameborder="0" width="728" scrolling="no" height="90" allowtransparency="allowtransparency"></iframe></div><div style="WIDTH: 728px; HEIGHT: 90px;"><script type="text/javascript"></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-7471407183047897&amp;dt=1217730768796&amp;lmt=1217730768&amp;prev_fmts=728x90_as%2C120x90_0ads_al_s&amp;output=html&amp;slotname=8773890557&amp;correlator=1217730768609&amp;url=http%3A%2F%2Fwww.mjtd.com%2FBBS%2Fdispbbs.asp%3FboardID%3D4%26ID%3D69376%26page%3D1&amp;ref=http%3A%2F%2Fwww.mjtd.com%2FBBS%2Findex.asp%3Fboardid%3D4&amp;frm=0&amp;cc=100&amp;ga_vid=1513236556.1217509049&amp;ga_sid=1217728782&amp;ga_hid=454191265&amp;ga_fc=true&amp;flash=9.0.124.0&amp;u_h=900&amp;u_w=1440&amp;u_ah=870&amp;u_aw=1440&amp;u_cd=32&amp;u_tz=480&amp;u_his=12&amp;u_java=true" frameborder="0" width="728" scrolling="no" height="90" allowtransparency="allowtransparency"></iframe></div><p>Sub jim()<br/>Dim m As Integer<br/>Dim sel1 As AcadSelectionSet<br/>Dim sel2 As AcadSelectionSet<br/>Dim first As Variant</p><p>Set sel1 = ThisDrawing.SelectionSets.Add("TEST1_Sjsh")<br/>sel1.SelectOnScreen<br/>Set first = sel1(0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '改这句就行了</p><p>Dim handle1 As Variant<br/>handle1 = first.Handle<br/>sel1.Delete<br/>End Sub</p>

jimzhoujim 发表于 2008-8-3 18:35:00

<p>谢谢,非常感谢</p>
页: [1]
查看完整版本: 为什么没有handle