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

# Batches オブジェクトの AddNew メソッド

このメソッドは、指定した名前のバッチをバッチ コレクションの末尾に追加します。

## 構文

```vb Visual Basic .NET theme={null}
Function AddNew() As Batch
```

```cpp C++ theme={null}
HRESULT AddNew(
  IBatch** Result
);
```

## パラメーター

**Result**

\[out, retval] 追加されたバッチのインターフェースポインターを受け取る [**IBatch**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md)\*\*\*\*\* 変数へのポインター。

## 戻り値

このメソッドには固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## サンプル

> [accordion] C++ (COM) コード
>
> ```cpp theme={null}
> // グローバルな ABBYY FlexiCapture SDK Engine オブジェクト。
> FCEngine::IEnginePtr Engine;
> ...
> // プロジェクトを開く
> FCEngine::IProjectPtr project = Engine->OpenProject(L"D:\\TestProject\\TestProject.fcproj");
> // 新しいバッチを追加
> FCEngine::IBatchPtr batch = project->Batches->AddNew( L"TestBatch" );
> ...
> ```

このメソッドは、次のコード サンプルで使用されています：[Hello](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#hello)

## 関連項目

[**Batches**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches.md)

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