Syntax
DrawCountPolyPoints([Object])
Remarks
Returns the number of points in a freeform drawing object. If the specified object is not a freeform shape, an error occurs.
Argument | Explanation |
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 determines whether the first two drawing objects in the document are freeform shapes. If they are, the points of the first freeform drawing object are loaded into the array pointsArray() and applied to the second freeform drawing object.
DrawSetRange "\Doc" If DrawGetType(1) = 7 And DrawGetType(2) = 7 Then size = DrawCountPolyPoints(1) Dim pointsArray(size, 2) DrawGetPolyPoints pointsArray(), 1 DrawSetPolyPoints size, pointsArray(), 2 Else MsgBox "The first or second drawing object is " + \ "not a freeform shape." End If
See Also
DrawFreeformPolygon, DrawGetPolyPoints, DrawSetPolyPoints