明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1181|回复: 2

为什么没有handle

[复制链接]
发表于 2008-8-3 10:12:00 | 显示全部楼层 |阅读模式

Sub jim()
Dim m As Integer
Dim sel1 As AcadSelectionSet
Dim sel2 As AcadSelectionSet
Dim first As Variant

Set sel1 = ThisDrawing.SelectionSets.Add("TEST1_Sjsh")
sel1.SelectOnScreen
Set first = ThisDrawing.SelectionSets.Item("TEST1_Sjsh")

Dim handle1 As Variant
handle1 = first.Handle
sel1.Delete
End Sub

我对first和handle1添加了监视,怎么first里面没有handle的属性呢?难道first不是object吗?请大家指教

发表于 2008-8-3 10:41:00 | 显示全部楼层

Sub jim()
Dim m As Integer
Dim sel1 As AcadSelectionSet
Dim sel2 As AcadSelectionSet
Dim first As Variant

Set sel1 = ThisDrawing.SelectionSets.Add("TEST1_Sjsh")
sel1.SelectOnScreen
Set first = sel1(0)      '改这句就行了

Dim handle1 As Variant
handle1 = first.Handle
sel1.Delete
End Sub

 楼主| 发表于 2008-8-3 18:35:00 | 显示全部楼层

谢谢,非常感谢

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 07:26 , Processed in 0.161619 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表