GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureOCR Class / GetStat Method
Example





In This Topic
GetStat Method (GdPictureOCR)
In This Topic
Returns the status of the last executed operation with the current GdPictureOCR object.
Syntax
'Declaration
 
Public Function GetStat() As GdPictureStatus
public GdPictureStatus GetStat()
public function GetStat(): GdPictureStatus; 
public function GetStat() : GdPictureStatus;
public: GdPictureStatus GetStat(); 
public:
GdPictureStatus GetStat(); 

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.
Remarks
Use this method in the combination with all those, which return a value instead of a status.
Example
How to check the if the called method has been followed without errors.
Using gdpictureOCR As GdPictureOCR = New GdPictureOCR()
 
    'Set up your prefered parameters for OCR.
 
    'Run the OCR process.
    Dim result As String = gdpictureOCR.RunOCR()
    'Check the status.
    Dim status As GdPictureStatus = gdpictureOCR.GetStat()
    If status = GdPictureStatus.OK Then
        'The method has been followed without errors.
        'Continue ...
    Else
        'Some error occurred.
        MessageBox.Show("The OCR process has failed with the status: " + status.ToString(), "Example: GetStat")
    End If
End Using
using (GdPictureOCR gdpictureOCR = new GdPictureOCR())
{
    //Set up your prefered parameters for OCR.
 
    //Run the OCR process.
    string result = gdpictureOCR.RunOCR();
    //Check the status.
    GdPictureStatus status = gdpictureOCR.GetStat();
    if (status == GdPictureStatus.OK)
    {
        //The method has been followed without errors.
        //Continue ...
    }
    else
    {
        //Some error occurred.
        MessageBox.Show("The OCR process has failed with the status: " + status.ToString(), "Example: GetStat");
    }
}
See Also