Dim fType(0 To 1) As Integer Dim fData(0 To 1) As Variant fType(0) = 0: fData(0) = "*Polyline": fType(1) = 8: fData(1) = "*" Dim adSS As AcadSelectionSet '选择集 Dim pline As AcadPolyline Set adSS = ThisDrawing.SelectionSets.Add("adSS") adSS.Select acSelectionSetAll, , , fType, fData '按过滤条件选择 MsgBox adSS.count For Each pline In adSS pline.Color = acRed Next adSS.Delete