> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recognize Method of the Batch Object

This method performs recognition of the documents from the batch. You can process all the documents from the batch or specify particular documents or document sections to recognize. Depending on the selected recognition mode the method performs full recognition procedure (selects a Document Definition, applies it and performs data recognition), or fulfill only some steps of the procedure (recognition of all the specified document batches or only changed ones).

## Syntax

```vb Visual Basic .NET theme={null}
Sub Recognize( _
  DocIds As IntsCollection, _
  Mode As RecognitionModeEnum, _
  Sections As SectionDefinitionsCollection _
)
```

```cpp C++ theme={null}
HRESULT Recognize(
  IIntsCollection*               DocIds,
  RecognitionModeEnum            Mode,
  ISectionDefinitionsCollection* Sections
);
```

## Parameters

**DocIds**

\[in] This parameter refers to the [**IntsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/intscollection.md) object that contains a set of indices of the recognizing documents. This parameter may be 0, in which case all the documents of the batch are recognized.

**Mode**

\[in] This variable of the [**RecognitionModeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/recognitionmodeenum.md) type specifies the mode of recognition. This parameter may be 0, which means the full recognition mode is selected.

**Sections**

\[in] This parameter refers to the [**SectionDefinitionsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitionscollection.md) object that specifies the sections of the applied Document Definition to recognize. This parameter may be 0, in which case all the sections are recognized.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

* During this method call documents in the batch can be reorganized, e.g. documents can be merged or split depending on the Document Definitions applied to them, also some document identifiers can be changed.
* To recognize documents from several batches, use the [**Recognize**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/project-recognize.md) method of the [**Project**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/project.md) object.

## Samples

> [accordion] C++ (COM) code
>
> ```cpp theme={null}
> // Global ABBYY FlexiCapture SDK Engine object.
> FCEngine::IEnginePtr Engine;
> ...
> // Open the project
> FCEngine::IProjectPtr project = Engine->OpenProject("D:\\TestProject\\TestProject.fcproj");
> // Add new batch
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> // Open the batch
> batch->Open();
> // Add images to the batch
> ...
> //Recognize documents
> batch->ApplyDocumentDefinitions( 0, VARIANT_FALSE, 0 );
> batch->Recognize( 0, Engine::RM_ReRecognizeMinimal, 0 );
> ```

This method is used in the following code samples: [Hello](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#hello).

## See also

[**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md)
