> ## 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.

# Método AddImage del objeto Batch

Este método permite agregar al lote una imagen desde un archivo. El método crea en el lote un documento para la imagen agregada.

> [!NOTE]
>
> Al agregar una imagen, se utilizan los parámetros de preparación de imágenes (objeto [**ImageLoadingParams**](https://docs.abbyy.com/es/flexi-capture/sdk/api-reference/imageloadingparams.md)), que son idénticos a los parámetros del tipo de lote al que se agrega la imagen.

## Sintaxis

```vb Visual Basic .NET theme={null}
Sub AddImage(Path As String)
```

```cpp C++ theme={null}
HRESULT AddImage(
  BSTR Path
);
```

## Parámetros

**Path**

\[in] Esta variable contiene la ruta completa del archivo de imagen. Por ejemplo, "D:\SampleImages\Sample.tif".

## Valores de retorno

Este método no tiene valores de retorno específicos. Devuelve los [valores de retorno estándar de las funciones de ABBYY FlexiCapture SDK](https://docs.abbyy.com/es/flexi-capture/sdk/api-reference/errorcodes.md).

## Observaciones

* Para agregar varias imágenes al lote, puede usar el método [**AddImages**](https://docs.abbyy.com/es/flexi-capture/sdk/api-reference/batch-addimages.md) del objeto [**Batch**](https://docs.abbyy.com/es/flexi-capture/sdk/api-reference/batch.md). Este método le permite configurar distintos parámetros para agregar las imágenes.
* También puede usar este método para abrir documentos digitales en [formatos compatibles](https://docs.abbyy.com/es/flexi-capture/sdk/specifications/digitalinputformats.md).

## Ejemplos

> [accordion] Código C++ (COM)
>
> ```cpp theme={null}
> // Objeto Engine global de ABBYY FlexiCapture SDK.
> FCEngine::IEnginePtr Engine;
> ...
> // Abrir el proyecto
> FCEngine::IProjectPtr project = Engine->OpenProject("D:\\TestProject\\TestProject.fcproj");
> // Agregar un nuevo lote
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> // Abrir el lote
> batch->Open();
> // Agregar una imagen al lote
> batch->AddImage( L"D:\\SampleImages\\0001.tif" );
> ...
> ```

Este método se utiliza en los siguientes ejemplos de código: [Hello](https://docs.abbyy.com/es/flexi-capture/sdk/guided-tour/samples.md#hello), [Invoices Processing and Training](https://docs.abbyy.com/es/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining).

## Consulte también

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