CogPolygon SetVertices Method Cognex VisionPro 9.8 SR1
Modify the coordinates of the vertices to match the supplied values. If there are more supplied values than vertices, append sufficient vertices. If there are fewer supplied values than vertices, discard vertices at the end.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.0.0.0
Syntax

public void SetVertices(
	double[,] coordinatesXY
)

Parameters

coordinatesXY
Type:  System Double 

An array of vertex coordinates.

Events

Event TypeReason
CogPolygon Changed

Fires when vertices are set.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    NumVertices < 1

    OUTOFMEMORYException

    The array cannot be allocated.

    Remarks

    Modifies the coordinates of the vertices to match the supplied values. If there are more supplied values than vertices, additional vertices are appended to the polygon. If there are fewer supplied values than vertices, the superfluous vertices are discarded.

    See Also