|
发表于 2018-10-8 09:31:00
|
显示全部楼层
Sub aaa()
Dim myss As AcadSelectionSet, datavalue(0) As Variant, gpcode(0) As Integer, groupCode As Variant, dataCode As Variant, n As Long
Do While ThisDrawing.SelectionSets.count 0
ThisDrawing.SelectionSets.Item(0).Delete
Loop
Set myss = ThisDrawing.SelectionSets.Add("XXX")
gpcode(0) = 100: datavalue(0) = "RasterImage"
groupCode = gpcode: dataCode = datavalue
myss.SelectOnScreen groupCode, dataCode '鼠标框选
'myss.Select acSelectionSetWindow, pnt1, pnt2, groupCode, dataCode '给定坐标窗口范围选择,pnt1和pnt2 为维数为3的数组
n = myss.count
End Sub
经实测可用,将鼠标框选语句替换成窗选语句即可。 |
|