我想一次选中图内所有图块但用下面的过滤不行: If acaddoc.SelectionSets.Count <> 0 Then For j = 0 To (acaddoc.SelectionSets.Count - 1) Set Selset = acaddoc.SelectionSets.Item(j) Selset.Delete Next j End If Set Selset = acaddoc.SelectionSets.Add("Sel1") Ftype(0) = 0: Fdata(0) = "AcDbBlockReference" Dim groupCode As Variant, dataCode As Variant groupCode = Ftype: dataCode = Fdata Selset.Select acSelectionSetAll, , , groupCode, dataCode a = Selset.Count 块的名称应该为"AcDbBlockReference"还是"BLOCK REFERENCE"?或者是其它的? 下面代码就能选出图内的多段线. If acaddoc.SelectionSets.Count <> 0 Then For j = 0 To (acaddoc.SelectionSets.Count - 1) Set Selset = acaddoc.SelectionSets.Item(j) Selset.Delete Next j End If Set Selset = acaddoc.SelectionSets.Add("Sel1") Ftype(0) = 0: Fdata(0) = "LWPOLYLINE" Dim groupCode As Variant, dataCode As Variant groupCode = Ftype: dataCode = Fdata Selset.Select acSelectionSetAll, , , groupCode, dataCode a = Selset.Count |