CogBeadInspectTrainResult CreateTrainResultGraphics Method Cognex VisionPro 9.7
Creates and returns a collection of graphics that depict the trained calipers. The graphics can be augmented with information from the mask, right fill, or left fill lists of the given runParams. The desired graphics are specified by the given graphicOptions.

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

public CogGraphicInteractiveCollection CreateTrainResultGraphics(
	CogBeadInspectTrainResultGraphicConstants graphicOptions,
	CogBeadInspectRunParams runParams,
	bool throwIfListsDontMatch
)

Parameters

graphicOptions
Type: Cognex.VisionPro.EdgeInspect CogBeadInspectTrainResultGraphicConstants
A value created by ORing together one or more values from CogBeadInspectTrainResultGraphicConstants.
runParams
Type: Cognex.VisionPro.EdgeInspect CogBeadInspectRunParams
The CogBeadInspectRunParams that will provide the mask and fill lists to be used when creating the requested graphics. If this argument is null, the mask and fill lists from the SuggestedRunParams will be used instead.
throwIfListsDontMatch
Type: System Boolean
If true, this method will throw an exception when the number of boolean elements in the mask or fill lists of the provided runParams does not match the number of trained calipers in this train result. Otherwise, only the mask or fill list elements that exist will be used.

Return Value

Type: CogGraphicInteractiveCollection
A CogGraphicInteractiveCollection filled with the requested graphics.
Exceptions

ExceptionCondition
CogInvalidMaskOrFillEdgeLengthExceptionthrowIfListsDontMatch is true, and the number of boolean elements in the mask or fill lists of the provided runParams does not match the number of trained calipers in this train result.
Remarks

The items in the returned collection are CogCompositeShapes that contain one or more sub-graphics. If you request the caliper rectangle (or the caliper center) graphics, there will be one CogCompositeShape per trained caliper location. Otherwise, there will be one CogCompositeShape for every caliper location that has a "true" in its mask or fill list.

The ID property of each returned CogCompositeShape is set to the index of the corresponding caliper.

The returned graphics and their children have their Interactive property set to True.

See Also