明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1266|回复: 2

[求助]请问过滤选择时报错是怎么回事?

[复制链接]
发表于 2004-2-8 22:20:00 | 显示全部楼层 |阅读模式
请教各位,报错信息为'-2147024809(80070057)',程序代码如下: Dim selset As AcadSelectionSet Set selset = ThisDrawing.SelectionSets.Add("jihe")
filtertype = 0 filterdata = "Text"
selset.SelectOnScreen filtertype, filterdata
MsgBox ok
For Each entry In selset
Next entry selset.Delete
发表于 2004-2-9 10:23:00 | 显示全部楼层
filtertype ,filterdata 必须为数组
  1. Sub kkk()
  2. Dim selset As AcadSelectionSet
  3. On Error Resume Next
  4. Set selset = ThisDrawing.SelectionSets("jihe")
  5. If Err Then Set selset = ThisDrawing.SelectionSets.Add("jihe")
  6. selset.Clear
  7. Dim filtertype(0 To 0) As Integer
  8. Dim filterdata(0 To 0) As Variant
  9. filtertype(0) = 0filterdata(0) = "Text"
  10. selset.SelectOnScreen filtertype, filterdata
  11. MsgBox selset.Count  
  12. End Sub
 楼主| 发表于 2004-2-9 21:25:00 | 显示全部楼层
了解了!谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-28 08:47 , Processed in 0.167898 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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