Private Sub CommandButton1_Click() Dim ass As AcadSelectionSet Dim ftype(0) As Integer Dim fdata(0) As Variant
ftype(0) = 0 fdata(0) = "TEXT" Set ass = ThisDrawing.SelectionSets.Add("ass") ass.Select acSelectionSetAll, , , ftype, fdata sco = ass.Count MsgBox "选中对象数:" & CStr(sco) End Sub |