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

# SectionDefinition オブジェクト（ISectionDefinition インターフェイス）

このオブジェクトは、Document Definition のセクションに対応します。Document Definition の*セクション*とは、文書の論理的にまとまった部分に対応する、ページのセット (または単一のページ) とそれらのページ上のフィールドのことです。文書内に複数ページにわたって続く、または繰り返し現れるブロックがある場合や、次のページに続くテーブルがある場合は、それらのページが単一のセクションに追加されます。flexible 記述内のフィールドはすべて、Document Definition の 1 つのセクションに属します。ドキュメントセットを扱う場合、**SectionDefinition** オブジェクトは別の Document Definition へのリンクになることもあります。

Document Definition のすべてのセクションは、[**SectionDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitions.md) オブジェクトで表されます。

## Properties

<table width="100%">
  <thead>
    <tr>
      <th>
        **名前**
      </th>

      <th>
        **型**
      </th>

      <th>
        **説明**
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **AllowFieldExtractionTraining**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        セクション内で、領域を持つ field を学習できるかどうかを指定します。
      </td>
    </tr>

    <tr>
      <td>
        **Comment**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        セクションの説明テキストを格納します。
      </td>
    </tr>

    <tr>
      <td>
        **DocumentDefinition**
      </td>

      <td>
        [**DocumentDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        このセクションを含む Document Definition へのアクセスを提供します。
      </td>
    </tr>

    <tr>
      <td>
        **Errors**
      </td>

      <td>
        [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        **Check** メソッドを最後に呼び出した際のエラーの説明のコレクションを返します。
      </td>
    </tr>

    <tr>
      <td>
        **Fields**
      </td>

      <td>
        [**FieldDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fielddefinitions.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        セクションの field のコレクションを返します。
      </td>
    </tr>

    <tr>
      <td>
        **FlexibleDescription**
      </td>

      <td>
        [**FlexibleDescription**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/flexibledescription.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        セクションの flexible 定義にアクセスします。セクションに flexible 定義がない場合、このプロパティは 0 を返します。
      </td>
    </tr>

    <tr>
      <td>
        **Id**
      </td>

      <td>
        [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        セクションの識別子を返します。
      </td>
    </tr>

    <tr>
      <td>
        **IsEnabled**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        このセクションを文書定義の照合に使用するかどうかを指定します。このプロパティを FALSE に設定すると、このセクションは文書処理の対象から除外されます。
      </td>
    </tr>

    <tr>
      <td>
        **IsFlexible**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        セクションが flexible 記述で定義されているかどうかを示します。このプロパティの値が TRUE の場合、field の名前は変更できません。
      </td>
    </tr>

    <tr>
      <td>
        **IsRepeatable**
      </td>

      <td>
        [**Boolean**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        セクションがドキュメント内で繰り返し可能かどうか、つまりセクション定義の適用後に、対応する複数の[field インスタンス](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fieldinstances.md)がドキュメント内に出現し得るかどうかを示します。
      </td>
    </tr>

    <tr>
      <td>
        **IsValid**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        セクションが有効かどうかを示します。セクション内にエラーがなく、最後に **Check** メソッドを呼び出して以降に変更されていない場合、そのセクションは有効です。
      </td>
    </tr>

    <tr>
      <td>
        **LinkedDocumentDefinition**
      </td>

      <td>
        [**DocumentDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition.md)

        、読み取り専用
      </td>

      <td>
        **Type** プロパティが TST\_DocumentDefinitionLink に設定されている場合は、対応する Document Definition を返します。それ以外の場合は NULL を返します。
      </td>
    </tr>

    <tr>
      <td>
        **Name**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        セクションの名前を格納します。
      </td>
    </tr>

    <tr>
      <td>
        **NlpModels**
      </td>

      <td>
        [**NlpModels**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/nlpmodels.md)

        、読み取り専用
      </td>

      <td>
        NLPモデルへのアクセスを提供します。
      </td>
    </tr>

    <tr>
      <td>
        **Pages**
      </td>

      <td>
        [**PageDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/pagedefinitions.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        セクションに含まれるページのコレクションを返します。
      </td>
    </tr>

    <tr>
      <td>
        **TrainingFields**
      </td>

      <td>
        [**FieldDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fielddefinitions.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        学習可能なfield定義のコレクションを取得します。学習できるのは、領域を持つことができるfield定義のみです (&#x20;

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

        &#x20;

        オブジェクトの&#x20;

        [**CanHaveRegion**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fielddefinition.md#canhaveregion)

        &#x20;

        プロパティを参照) 。

        子要素を持つfield定義の場合、コレクションに含まれるのは領域を持つことができる子field定義のみであり、&#x20;

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

        &#x20;

        オブジェクトの&#x20;

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

        &#x20;

        メソッドを呼び出すと、それらの子field定義のみが学習されます。
      </td>
    </tr>

    <tr>
      <td>
        **Type**
      </td>

      <td>
        [**TemplateSectionTypeEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/templatesectiontypeenum.md)

        、読み取り専用
      </td>

      <td>
        オブジェクトが単純なセクションか、Document Definition へのリンクかを指定します。
      </td>
    </tr>

    <tr>
      <td>
        **UseOwnRecognitionParams**
      </td>

      <td>
        [**Boolean**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        セクションを Document Definition のパラメーターで認識し、ABBYY
        FlexiLayout Studio で作成された flexible 記述からロードしたパラメーターを使用**しない**かどうかを指定します。

        Document Definition のパラメーターは、以下の項目について flexible 記述の設定を上書きできます。

        <ul>
          <li>
            バーコードの事前認識 (

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

            )
          </li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>
        **Warnings**
      </td>

      <td>
        [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        直近の **Check** メソッド呼び出しで発生した警告の説明を格納したコレクションを返します。
      </td>
    </tr>
  </tbody>
</table>

## メソッド

| **名前** | **説明** |
| - | - |
| [**Check**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition-check.md) | セクションのプロパティが正しく設定されているかどうかを確認します。 |
| [**LoadFlexibleDescription**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition-loadflexibledescription.md) | 指定した ABBYY FlexiLayout Studio ファイルから flexible 記述をロードします。 |
| [**LoadFlexibleDescriptionFromStream**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition-loadflexibledescriptionfromstream.md) | ストリームから flexible 記述をロードします。 |
| [**LoadXFDDescription**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition-loadxfddescription.md) | 指定した XMLフォーム定義ファイルからフォームをロードします。 |

## 関連オブジェクト

![](https://mintcdn.com/abbyy/DG4YBah30S0eFFo5/images/flexi-capture/sdk/SectionDefinition.gif?s=848344376f9a8b8304f94ee156575475)

## 出力パラメーター

このオブジェクトは、次のメソッドの出力パラメーターです。

* [**SectionDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitions.md) オブジェクトの [**Item**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/item.md) メソッドおよび [**AddNew**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitions-addnew.md) メソッド
* [**SectionDefinitionsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitionscollection.md) オブジェクトの [**Item**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/item.md) メソッド

## 入力パラメーター

このオブジェクトは、次のメソッドの入力パラメーターです。

* [**Batch**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch.md) オブジェクトの [**ForceApplyDocumentDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/batch-forceapplydocumentdefinition.md) メソッド
* [**SectionDefinitionsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitionscollection.md) オブジェクトの [**Add**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/add.md) メソッド

## サンプル

このオブジェクトは、次のコード サンプルで使用されています：[分類](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#classification)、[請求書の処理と学習](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining)。

## 関連項目

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

[ドキュメント定義の作成](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/creatingdocumentdefinitions.md)

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