For this example, I drew and selected a:
- Circle
- Line
- Ray
- Arc
- Text
- Point
Code:
Sub demo()
Dim ss As AcadSelectionSet, item As AcadEntity, str As String
Set ss = ThisDrawing.PickfirstSelectionSet
' The above two lines are just so I can form
' a selection set. You are forming one in a different
' way, right?
For Each item In ss
Select Case item.ObjectName
Case Is = "AcDbArc": str = str & "ARC RADIUS = " & item.Radius & vbCrLf
Case Is = "AcDbText": str = str & "TEXT STRING = " & item.TextString & vbCrLf
Case Is = "AcDbLine": str = str & "LINE LAYER = " & item.Layer & vbCrLf
Case Is = "AcDbRay": str = str & "RAY LINETYPE = " & item.Linetype & vbCrLf
Case Is = "AcDbCircle": str = str & "CIRCLE AREA = " & item.Area & vbCrLf
Case Else: str = str & "ENTITY FOUND = " & item.ObjectName & vbCrLf
End Select
Next item
MsgBox str
End Sub
Which will return the following information
Summary:
- Iterate the selection set
- Check the entity type
- Query for properties that apply to that entity