Gets the Integer error code for the last executed vision process.
...vision_object.ErrorCode
Prerequisites
A Process method must have been executed using the vision_object and the execution must be completed.
Parameters
None
Remarks
This property returns the Integer error code for the last vision process executed by the vision_object. A value of 0 indicates success; a negative value indicates an error. If no process was ever run, a value of 0 is returned. Please see the section on System Error Codes in the Precise PreciseFlex Library for a list of vision error codes and their interpretation. This property is different from the visresults_object.ErrorCode. The visresults_object.ErrorCode indicates if a specific Vision Tool encountered an error during execution, e.g. it didn't find what it was searching for. The vision_object.ErrorCode indicates if a vision process could not be found or if a communication error occurred between GPL and PreciseVision. This property never signals an error if an individual tool fails for whatever reason. If the vision_object.Status property returns a value of 2, indicating that an error has occurred, the ErrorCode property contains the specific error code that describes the type of error.
Examples
Dim vobject As New Vision
vobject.Process("find_part") ' Execute find_part process
If vobject.ErrorCode <> 0 Then
' Handle error
End If
See Also
Vision Classes |vision_object.Status | visresult_object.ErrorCode