- 积分
- 2262
- 明经币
- 个
- 注册时间
- 2004-12-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2018-10-8 09:31:28
|
显示全部楼层
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
经实测可用,将鼠标框选语句替换成窗选语句即可。 |
|