Excel VBA删除CAD文件中指定区域的对象
想通过Excel VBA宏工作自动删除CAD文件中指定区域中的对象,试了两天都没用成功。Sub sel000()
Dim sel1 As AcadSelectionSet
Dim p1(0 To 2) As Double
Dim p2(0 To 2) As Double
p1(0) = 0: p1(1) = 0: p1(2) = 0
p2(0) = 300: p2(1) = 300: p2(2) = 0
Mode = acselectionsetcrossing
Set sel1 = ThisDrawing.SelectionSets.Add("sel3") '新建一个选择集
Call sel1.Select(Mode, p1, p2)
For Each E in Sel1
E.delete
next
Sel.delete
End Sub
在主程序运行到该子程序时 提示“Object required”
本人是菜鸟不知道以上命名是CAD VBA的还是Excel VBA的,是否可以在EXCEL VBA中这样使用
跪求大神回复,