yuren503 发表于 2004-2-8 22:20:00

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

请教各位,报错信息为'-2147024809(80070057)',程序代码如下:


Dim selset As AcadSelectionSet


Set selset = ThisDrawing.SelectionSets.Add("jihe")<BR>filtertype = 0


filterdata = "Text"


<BR>selset.SelectOnScreen filtertype, filterdata<BR>MsgBox ok<BR>For Each entry In selset<BR>Next entry


selset.Delete<BR>

topirol 发表于 2004-2-9 10:23:00

filtertype ,filterdata 必须为数组Sub kkk()
Dim selset As AcadSelectionSet
On Error Resume Next
Set selset = ThisDrawing.SelectionSets("jihe")
If Err Then Set selset = ThisDrawing.SelectionSets.Add("jihe")
selset.Clear
Dim filtertype(0 To 0) As Integer
Dim filterdata(0 To 0) As Variant
filtertype(0) = 0filterdata(0) = "Text"
selset.SelectOnScreen filtertype, filterdata
MsgBox selset.Count
End Sub

yuren503 发表于 2004-2-9 21:25:00

了解了!谢谢!
页: [1]
查看完整版本: [求助]请问过滤选择时报错是怎么回事?