Click or drag to resize

IOcrManagerSetActiveOcrEngine Method

Designate the supplied OCR engine as the one to use

Namespace:  EdaIntegrationContract.OCR
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 7.6
Syntax
C#
void SetActiveOcrEngine(
	IOcrEngine ocrEngine
)

Parameters

ocrEngine
Type: EdaIntegrationContract.OCRIOcrEngine
The OCR engine to use
Examples
The following example demonstrates updating the properties for a case.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.OCR;
using EdaIntegrationContract.OCR.Expervision;

class Sample
{
    public static void Main()
    {
        var edaIntegration = new EdaIntegration().ConnectToExplore();
        ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        // Set OCR case properties
        IOcrProperties ocrProps = theCase.OCR.Properties;
        ocrProps.MaxOcrAgents = 4;
        ocrProps.QueueForOcrDuringAnalysis = true;
        ocrProps.AnalysisOcrFileTypes = theCase.OCR.GetValidOcrFileTypes();
        theCase.OCR.UpdateProperties();

        // Specify which OCR engine to use 
        IExpervisionOcrEngine ocrEng = theCase.OCR.GetOcrEngine<IExpervisionOcrEngine>();
        ocrEng.Language = ExpervisionLanguage.English;
        ocrEng.AutoDeskew = true;
        ocrEng.AutoRotate = ExpervisionAutoRotateSetting.AlwaysOn;
        theCase.OCR.SetActiveOcrEngine(ocrEng);
    }
}
See Also