Dim obj As AcadObject
Dim pnt As Variant
Dim SSetObj As AcadSelectionSet
Dim u As Integer
Dim coord As Variant
Dim pointsArray() As Double
' On Error Resume Next
ThisDrawing.Utility.GetEntity obj, pnt
MsgBox obj.ObjectName
If obj.ObjectName = "AcDb2dPolyline" Then
coord = obj.Coordinates
u = UBound(coord)
ReDim pointsArray(u)
For i = 0 To u
pointsArray(i) = coord(i)
Next
End If
If Not IsNull(ThisDrawing.SelectionSets.Item("TEST_SSET2")) Then
Set SSetObj = ThisDrawing.SelectionSets.Item("TEST_SSET2")
SSetObj.Delete
End If
Set SSetObj = ThisDrawing.SelectionSets.Add("TEST_SSET2")