CogLineMax MaxNumLines Property Cognex VisionPro 9.21 SR1
Gets or sets the maximum number of lines to be found. A LineMaxMulti license must be available to execute the tool with MaxNumLines set to greater than or equal to 0.

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

public int MaxNumLines { get; set; }

Property Value

Type: Int32
If a LineMaxMulti license is not found, MaxNumLines must be set to 0 or 1. If a LineMaxMulti license is found, there is no upper limit on MaxNumLines, though processing time will increase with larger values.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this property changes.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown when you assign a value less than zero.
Remarks

A LineMaxMulti license must be available to execute the tool with MaxNumLines set to greater than 1. If a LineMaxMulti license is not found, MaxNumLines can only be set to 0 or 1, or the tool will generate a CogSecurityViolationException exception. If MaxNumLines is set to 0, line segments will not be returned, but CogLineMaxResult.ConsideredOutliers and CogLineMaxResults.UnconsideredOutliers will still be calculated.
See Also