如何删除指定区域内的所有对象?
这个问题没什么难度吧,过滤选择不就行了 测试不行肯定是你的代码有问题,你贴出来让大家看看呀我是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
在前面加一句:on error resume next 即可
on error resume next 可以运行并不代表你的程序运行过程中没有错误,只是忽略错误强制运行过去,VBA不建议使用语句on error resume next
页:
[1]