CogPolygon AddVertex Method Cognex VisionPro 9.21 SR1
Add a vertex to the polygon. If the default index -1 is used, the new vertex will be added to the end of any existing vertices. Otherwise Index must be >= 0 and <= NumVertices.

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

public void AddVertex(
	double x,
	double y,
	int index
)
Events

Event TypeReason
CogPolygon Changed

Fires when a vertex is added.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    index < −1

    ArgumentException

    index > NumVertices

    OUTOFMEMORYException

    The memory to store the vertices cannot be allocated.

    Remarks

    Add a vertex to the polygon at the given index. If index is −1 or NumVertices, the vertex is added to the end.

    See Also