CogTransform2DComposed Replace Method Cognex VisionPro 9.7
Replaces the transform at the given index with the passed Replacement transform. If Copy is True, the Replacement transform is added by value, otherwise, it is added by reference.

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

public ICogTransform2D Replace(
	int index,
	ICogTransform2D replacement,
	bool copy
)

Parameters

index
Type: System Int32

The zero-based index of the transformation to replace.

replacement
Type: Cognex.VisionPro ICogTransform2D

The new transformation.

copy
Type: System Boolean

If true, replacement is copied into this object. Otherwise, it is added by reference.

Return Value

Type: ICogTransform2D

The transformation that was replaced.

Events

Event TypeReason
CogTransform2DComposed Changed

Fires when the transformation is replaced.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    index is < 0 or > Count−1

    ArgumentException

    replacement is NULL.

    Remarks

    Replaces the specified transformation in this composed transformation's list of transformations with the supplied transformation. If copy is true, the replacement transformation is added by value (copied). If copy is false, then it is added by reference.

    This function returns the transformation being replaced.

    See Also