Batch Object (IBatch Interface)

This object corresponds to a batch. The batch is a set of documents grouped by the user. The assignment of documents to batches is user-defined: you can process all documents in one batch, or form batches from documents added on the same date or from a batch scanned in a single pass. Each batch is a part of a project. All the batches of the project are represented by the Batches object.

To start your work with the batch, you should first open it using the Open method. The documents of the batch are accessible through the Documents property, while the project containing the batch is available through the Project property. The object contains properties for accessing different batch attributes such as its identifier, title, and path to the batch, and provides a set of methods for document processing.

The batch can contain separate documents as well as document sets. A document set consists of several documents related to one another because they serve some common purpose. For example, personal loan applications, insurance reports, etc. Processing document sets in some way differs from the usual processing scenarios. A document in a document set can contain not only pages, but also other documents. In the scenarios when an item of a batch can be a document set with child documents as well as a single document, the batch structure should be implemented using the BatchItems object. This object represents a collection of batch items of both types.

The Batch object is a so-called "connectable object." The methods of the Batch object report information about page processing progress through special outgoing interfaces. These interfaces are IBatchEvents (for C++) and the dispinterface DIBatchEvents (for Visual Basic). It should be noted that Visual Basic users should not care for details of implementing event interfaces, as this development platform provides easy means for handling them.

Properties

Name Type Description
AsClassificationTrainingBatch ClassificationTrainingBatch, read-only Converts the batch to the training batch for classification.
AsFieldsExtractionTrainingBatch FieldsExtractionTrainingBatch, read-only Converts the batch to the training batch for fields extraction.
Comment String Allows you to specify any text comment for the batch. This comment can be viewed in ABBYY FlexiCapture.
Documents Documents, read-only Returns the collection of documents of the batch.
Errors StringsCollection, read-only

Returns the collection of error messages. The collection includes the descriptions of the errors which occurred during the latest execution of the AddImage, AddImages, ApplyDocumentDefinitions, ForceApplyDocumentDefinition, Recognize, CheckRules, or Export method. The same messages you can receive using the IBatchEvents::OnError method.

Note: Rule errors can be obtained by the Document::RuleErrors, VerificationSession::Errors, and ContextVerificationObject::RuleErrors properties.

Id Integer, read-only Returns the identifier of the batch.
IsOpen Boolean, read-only Specifies whether the batch is open. If the value of this property is FALSE, not all the properties and methods of the Batch object are available. To open or close the batch, use the Open or Close methods of the Batch object respectively.
Name String, read-only Returns the batch name.
Project Project, read-only Returns the Project object which contains the batch.
RegistrationParameters RegistrationParameters, read-only Returns a collection of registration parameters of the batch.
Type BatchType

Specifies the batch type.

It stores the batch processing settings that are common to all batches of this type. If the settings are updated via BatchTypeParams, the batch will be recognized with the new settings.

You may set this property to NULL to reset the batch to the default type (to be recognized with the default settings).

Warnings StringsCollection, read-only

Returns the collection of warning messages. The collection includes the descriptions of the warnings which occurred during the latest execution of the AddImage, AddImages, ApplyDocumentDefinitions, ForceApplyDocumentDefinition, Recognize, CheckRules, or Export method. The same messages you can receive using the IBatchEvents::OnWarning method.

Note: Rule warnings can be obtained by the VerificationSession::Warnings properties.

Methods

Name Description
AddImage Adds one image from a file to the batch.
AddImages Adds images from several files to the batch.
AddImageFromStream Adds one image from stream to the batch. You cannot use this method to open digital documents.
ApplyDocumentDefinitions Applies Document Definitions to the documents of the batch.
CheckRules Checks all rules imposed on data in the specified documents.
Close Closes the batch and frees resources.
DeleteRecognitionResults Deletes all recognition results in the specified documents.
Disassemble Splits the documents with specified identifiers into pages.
Export Saves results of processing of the specified documents in selected location.
ExportToMemory Saves results of processing of the specified documents into memory.
ForceApplyDocumentDefinition Forcibly applies Document Definitions to the documents of the batch.
MoveDocument Moves a document to this batch from another batch.
Open Opens the batch.
Recognize Recognizes the documents of the batch.
Rename Changes the batch name and returns the new name.
StartVerification Starts verification of the specified documents in the batch.

Related objects

Output parameter

This object is the output parameter of the AddNew, AddNewEx, Item, FindById methods of the Batches object.

Input parameter

This object is the input parameter of the ImportImages method of the Project object.

Samples

C++ (COM) code

This object is used in all code samples.

See also

Batches

IBatchEvents

BatchItems

BatchItem

Working with Properties

15.08.2023 13:19:30

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.