- Sub gs()
- Dim entry As AcadEntity
- Dim entname As String
- Dim lObjectID As Long
- Dim s As String
- Dim BlkName As String
- For Each entry In ThisDrawing.ActiveSelectionSet
- entname = entry.ObjectName
- lObjectID = entry.ObjectID
- BlkName = ""
- [b]If entname = "AcDbBlockReference" Then BlkName = " , BlockName:" & entry.Name
- s = "Name:" & entname & ", ID:" & lObjectID & BlkName & vbCrLf[/b]
- entry.Highlight (True)
- ThisDrawing.Application.Update
- MsgBox s
- entry.Highlight (False)
- Next
- End Sub
|