Coordinates property example
Sub Coordinates_Example()
Dim plineObj As AcadPolyline
Dim points(5) As Double
points(0) = 3: points(1) = 7: points(2) = 0
points(3) = 9: points(4) = 2: points(5) = 0
Set plineObj = ThisDrawing.ModelSpace.AddPolyline(points)
ThisDrawing.Regen True
Dim retCoord As Variant
retCoord = plineObj.Coordinates
MsgBox "The current coordinates of the second vertex are: " & _
retCoord(3) & ", " & retCoord(4) & ", " & retCoord(5)
points(3) = 5: points(4) = 5: points(5) = 0
plineObj.Coordinates = points
ThisDrawing.Regen True
MsgBox "The new coordinates have been set to " & _
points(3) & ", " & points(4) & ", " & points(5)
End Sub
© Bricsys NV. All rights reserved. |