DrawGetPolyPoints

Syntax

DrawGetPolyPoints TwoDimensionalArray[$]() [Object]

Remarks

Fills a two-dimensional array with coordinates of the end points in the specified freeform drawing object. If the specified object is not a freeform shape, an error occurs. You can use the array as an argument for DrawSetPolyPoints to apply the coordinates to another freeform drawing object. You must define the array before running DrawGetPolyPoints; use DrawCountPolyPoints() to determine the appropriate size for the array.

Argument

Explanation

TwoDimensionalArray[$]()

The predefined two-dimensional array to fill with the coordinates of the specified freeform drawing object. TwoDimensionalArray[$]() may be a string or numeric array. A string array is filled with text measurements consisting of a number followed by the abbreviation for the default measurement unit. A numeric array is filled with the numbers only.

Object

Specifies a drawing object:

Omitted The selected drawing object

> 0 (zero) An object whose anchor is in a range set by the DrawSetRange statement, where 1 is the first object in the range, 2 is the second object, and so on. If the number is not in the range 1 to DrawCount(), an error occurs.


Example

This example stores the coordinates of the selected freeform drawing object in the array pointsArray(). If a freeform drawing object is not selected, an error occurs.


If DrawGetType() = 7 Then
    size = DrawCountPolyPoints()
    Dim pointsArray(size, 2)
    DrawGetPolyPoints pointsArray()
Else
    MsgBox "The selected drawing object is not a freeform shape."
End If

For another example, see DrawCountPolyPoints().

See Also

DrawCountPolyPoints(), DrawFreeformPolygon, DrawSetPolyPoints