For Each acSSObj As SelectedObject In acSSet
If Not IsDBNull(acSSObj) Then
Dim acEnt As Entity = CType(acTrans.GetObject(acSSObj.ObjectId, OpenMode.ForRead), Entity)
Dim TypeOfEnt As String = acEnt.GetType.Name
Select Case TypeOfEnt
Case "Polyline3d"
Dim PL3D As Polyline3d = DirectCast(acEnt, Polyline3d)
acDoc.Editor.WriteMessage(PL3D.Area)
End Select
End If
Next