设置过滤器就行啊, Sub selectblk() On Error Resume Next Dim f0() As Integer, f1() As Variant Dim ss As AcadSelectionSet ReDim f0(0) ReDim f1(0) f0(0) = 0 f1(0) = "insert" f0(0) = 2 f1(0) = "cg20a" '块名 Set ss = ThisDrawing.SelectionSets.Add("ccc") If Err Then Err.Clear Set ss = ThisDrawing.SelectionSets.Item("ccc") ss.Clear End If ss.Select acSelectionSetAll, , , f0, f1 ss.Erase End Sub |