Something like this?
I hope this helps you!Code:Sub Example_Coordinates() Dim Selection As AcadSelectionSet Dim Poly As AcadLWPolyline Dim Obj As AcadEntity Dim Bound As Double 'Makes a selectionset. 'On Error Resume Next Set Selection = ThisDrawing.SelectionSets.Item("Select polyline.") If Err Then Set Selection = ThisDrawing.SelectionSets.Add("Select polyline.") Err.Clear Else Selection.Clear End If 'Select the polyline. Selection.SelectOnScreen For Each Obj In Selection If Obj.ObjectName = "AcDbPolyline" Then Set Poly = Obj On Error Resume Next Bound = UBound(Poly.Coordinates) x = 0 y = 1 For i = 0 To Bound / 2 MsgBox "X= " & Poly.Coordinates(x) & " Y= " & Poly.Coordinates(y) If Err Then Err.Clear x = x + 2 y = y + 2 Next End If Next Obj End Sub
Greetings



Reply With Quote


Bookmarks