IOcrManagerSetActiveOcrEngine Method |
Namespace: EdaIntegrationContract.OCR
void SetActiveOcrEngine( IOcrEngine ocrEngine )
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); } }