我试过没问题,测试代码如下:
Sub tt() On Error Resume Next p1 = ThisDrawing.Utility.GetPoint p2 = ThisDrawing.Utility.GetCorner(p1) Dim ss As AcadSelectionSet ThisDrawing.SelectionSets("Test").Delete Set ss = ThisDrawing.SelectionSets.Add("Test") ss.Select acSelectionSetWindow, p1, p2 MsgBox ss.Count End Sub