用这种方法可以做到的
Dim ssetObj As AcadSelectionSet Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET2") ' Add all the entities that lie within a fence to the selection set Dim mode As Integer Dim pointsArray(0 To 11) As Double mode = acSelectionSetFence pointsArray(0) = 28.2: pointsArray(1) = 17.2: pointsArray(2) = 0 pointsArray(3) = -5: pointsArray(4) = 13: pointsArray(5) = 0 pointsArray(6) = -3.3: pointsArray(7) = -3.6: pointsArray(8) = 0 pointsArray(9) = 28: pointsArray(10) = -3: pointsArray(11) = 0 ssetObj.SelectByPolygon mode, pointsArray
|