CogUserTool RunTool Method Cognex VisionPro 9.5
Should only be called from tool group script. Runs a single tool. Will not run the tool if it is currently disabled.

Namespace: Cognex.VisionPro.Implementation.Internal
Assembly: Cognex.VisionPro.ToolGroup (in Cognex.VisionPro.ToolGroup.dll) Version: 69.0.0.0 (69.0.0.0)
Syntax

public void RunTool(
	ICogTool subTool,
	ref string message,
	ref CogToolResultConstants result
)

Parameters

subTool
Type: Cognex.VisionPro ICogTool
The tool to run.
message
Type: System String 
This is the message corresponding to the worst tool result encountered during the current run of the tool group. Here an Error result is considered worse than Reject, which is considered worse than Warning, which is considered worse than Accept. So if the result from running the supplied (sub) tool is worse than the value of the result argument, then this message argument is overwritten to reflect this tool's run.
result
Type: Cognex.VisionPro CogToolResultConstants 
This is the value of the worst tool result encountered during the current run of the tool group. Here an Error result is considered worse than Reject, which is considered worse than Warning, which is considered worse than Accept. So if the result from running the supplied (sub) tool is worse than the input value of this argument, then this argument is overwritten with the new, worse result value.
Exceptions

ExceptionCondition
Exception Thrown when this (sub) tool returns an Error result and the tool group's AbortRunOnToolFailure property is True.
See Also