> ## 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 オブジェクト（IBatches インターフェース）

このオブジェクトは、作業中のプロジェクトに含まれる、ドキュメント処理用の作業[バッチ](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md#batch)のコレクションです。標準的なコレクションのメソッドとプロパティに加えて、識別子や名前でバッチを検索するための [**FindById**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-findbyid.md) メソッドと [**FindByName**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-findbyname.md) メソッドを備えています。特定のプロジェクトのバッチにアクセスするには、対応する [**Project**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/project.md) オブジェクトの **Batches** プロパティを使用します。

**Batches** オブジェクトは、いわゆる「[接続可能なオブジェクト](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/connectableobjects.md)」です。**Batches** オブジェクトのメソッドは、専用の発信インターフェースを介してコレクションの変更を通知します。これらのインターフェースは、[**ICollectionEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/icollectionevents.md) (C++ 用) とディスパッチインターフェース [**DICollectionEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/icollectionevents.md) (Visual Basic 用) です。なお、Visual Basic にはイベントを簡単に処理する仕組みが用意されているため、Visual Basic ユーザーはイベントインターフェースの実装の詳細を意識する必要はありません。

## Properties

| **Name** | **型** | **Description** |
| - | - | - |
| [**Count**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/count.md) | [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | コレクション内の要素数を格納します。 |
| [**Element**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/element.md) | [**Batch**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md)、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | コレクション内の 1 つの要素にアクセスできます。 |

## メソッド

| **名前** | **説明** |
| - | - |
| [**AddNew**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-addnew.md) | 指定した名前のバッチを、バッチのコレクションの末尾に追加します。 |
| [**AddNewEx**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-addnewex.md) | 指定したバッチタイプのバッチを、バッチのコレクションの末尾に追加します。 |
| [**FindById**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-findbyid.md) | バッチ識別子を指定して、コレクション内のバッチにアクセスします。 |
| [**FindByName**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batches-findbyname.md) | バッチ名を指定して、コレクション内のバッチにアクセスします。 |
| [**Item**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/item.md) | コレクション内のインデックスを指定して、コレクションの 1 つの要素にアクセスします。 |
| [**DeleteById**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/deletebyid.md) | 指定した識別子を持つ要素をコレクションから削除します。開いているバッチ ([**IBatch::IsOpen**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md#isopen) プロパティが TRUE のバッチ) は削除できません。 |
| [**DeleteAll**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/deleteall.md) | コレクションからすべての要素を削除します。開いているバッチ ([**IBatch::IsOpen**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md#isopen) プロパティが TRUE のバッチ) は削除できません。 |

## 関連オブジェクト

![](https://mintcdn.com/abbyy/89WLEbAVqQ-ysQEU/images/flexi-capture/sdk/Batches.gif?s=be1868c815ccdcafb5b59e2e9b3a37ed)

## サンプル

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

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

## 関連項目

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

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

[コレクションの操作](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/collections.md)

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

[接続可能なオブジェクトの使用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/connectableobjects.md)

[Propertiesの操作](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md)
