我是c#方向,也没有现成的代码
Sub aa()
Dim ss As AcadSelectionSet
Set ss = ThisDrawing.SelectionSets.Add("abfdc")
Dim pt(0 To 14) As Double
pt(0) = 0
pt(1) = 0
pt(2) = 0
pt(3) = 100
pt(4) = 0
pt(5) = 0
pt(6) = 100
pt(7) = 100
pt(8) = 0
pt(9) = 80
pt(10) = 80
pt(11) = 0
pt(12) = 0
pt(13) = 100
pt(14) = 0
ss.SelectByPolygon acSelectionSetWindowPolygon, pt
End Sub 最后的晨露 发表于 2012-10-22 10:20 static/image/common/back.gif
上面的代码在 If Not IsNull(ThisDrawing.SelectionSets.Item("zqwu")) Then这句出现“未找到主键”的错误 ...
在前面加一句:on error resume next 即可 最后的晨露 发表于 2012-10-22 13:13 static/image/common/back.gif
可以了,谢谢!
on error resume next 可以运行并不代表你的程序运行过程中没有错误,只是忽略错误强制运行过去,VBA不建议使用语句on error resume next
页:
[1]
2