Dim Pt1 As Variant Dim Pt2 As Variant EntObj(0).GetBoundingBox Pt1, Pt2 '创建选择集 Dim ssetObj As AcadSelectionSet Set ssetObj = ThisDrawing.SelectionSets("SSET") If Err Then Set ssetObj = ThisDrawing.SelectionSets.Add("SSET") ssetObj.Clear '设置图层过滤 Dim gpCode(0) As Integer Dim dataValue(0) As Variant gpCode(0) = 8 dataValue(0) = "dgx" '选择与该直线相交或者包含在外框中的所有实体 ssetObj.Select acSelectionSetCrossing, Pt1, Pt2, gpCode, dataValue
|