CogShapeModelLineSegment CreateSubFeatureIterator Method Cognex VisionPro 9.24
Returns a newly created iterator for iterating over all subfeatures. The iterator is positioned at the subfeature specified by InitialIndex. A value of -1 creates an iterator that is positioned just after the last valid subfeature.

Namespace: Cognex.VisionPro.Implementation.Internal
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax

public virtual ICogModelFeatureIterator CreateSubFeatureIterator(
	int initialIndex
)

Parameters

initialIndex
Type: System Int32

The initial position of the iterator. If this value is −1, the iterator is positioned after the last valid subfeature.

Return Value

Type: ICogModelFeatureIterator

The iterator.

Implements

ICogShapeModel CreateSubFeatureIterator(Int32)
Exceptions

ExceptionCondition
ArgumentException

IntialIndex >= SubFeatureCount or < 0 (after translating −1 appropriately).

Remarks

Returns a newly created iterator for iterating over all subfeatures. The iterator is positioned at the subfeature specified by initialIndex. A value of −1 creates an iterator that is positioned just after the last valid subfeature.

Most shape models do not have subfeatures, so it is not unusual for this method to return Nothing (or NULL). Only CogGeneralContour objects have subfeatures.

See Also