Curve.Points Method (Visio)

Returns an array of points that defines a polyline that approximates a Path or Curve object within a given tolerance.


expression. Points( _Tolerance_ , _xyArray()_ )

expression A variable that represents a Curve object.


Name Required/Optional Data Type Description
Tolerance Required Double Specifies how close the returned array of points must approximate the true path.
xyArray() Required Double Returns an array of alternating x and y values specifying points along a path's or curve's stroke.

Return Value



Use the Points method of the Path or Curve object to obtain an array of x,y coordinates specifying points along the path or curve within a given tolerance. The tolerance and returned x,y values are expressed in internal drawing units (inches).

If you used the Paths property of a Shapes object to obtain the Path or Curve object being queried, the coordinates are expressed in the parent's coordinate system. If you used the PathsLocal property of a Shape object to obtain the Path or Curve object, the coordinates are expressed in the local coordinate system.

If Microsoft Visio is unable to achieve the requested tolerance, Visio approximates the points as close to the requested tolerance as possible. Generally speaking, the lower the tolerance, the more points Visio returns. Visio doesn't accept a tolerance of zero (0).

The array returned includes both the starting and ending points of the path or curve even if it is closed.


This Microsoft Visual Basic for Applications (VBA) macro places a shape on the page, retrieves its Paths collection, and then uses the Points method of the Path object to return an array of points that defines a polyline approximating the Path object.

Public Sub Points_Example() 
 Dim vsoShape As Visio.Shape 
 Dim adblXYPoints() As Double 
 Dim strPointsList As String 
 Dim intOuterLoopCounter As Integer 
 Dim intInnerLoopCounter As Integer 
 Set vsoShape = ActivePage.DrawOval(1, 1, 4, 4) 
 For intOuterLoopCounter = 1 To vsoShape.Paths.Count 
 vsoShape.Paths(intOuterLoopCounter).Points 0.1, adblXYPoints 
 For intInnerLoopCounter = LBound(adblXYPoints) To UBound(adblXYPoints) 
 strPointsList = strPointsList &; adblXYPoints(intInnerLoopCounter) &; Chr(10) 
 Next intInnerLoopCounter 
 Next intOuterLoopCounter 
 Debug.Print strPointsList 
End Sub