> ## 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 Object (ISectionDefinition Interface)

This object corresponds to a section of a Document Definition. A *section* of a Document Definition is a set of pages (or a single page) and fields on these pages, which corresponds to a logically complete part of a document. Pages are added to a single section if the document has blocks continuing or recurring on several pages or tables continuing on the following page. All fields in a flexible description belong to one section of a Document Definition. The **SectionDefinition** object can also be a link to another document definition in case of working with document sets.

All sections of a Document Definition are represented by a [**SectionDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitions.md) object.

## Properties

<table width="100%"><thead><tr><th>**Name**</th><th>**Type**</th><th>**Description**</th></tr></thead><tbody><tr><td>**AllowFieldExtractionTraining**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md)</td><td>Specifies if the fields with region can be trained inside the section.</td></tr><tr><td>**Comment**</td><td>[**String**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md)</td><td>Stores the text description of the section.</td></tr><tr><td>**DocumentDefinition**</td><td>[**DocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Provides access to the Document Definition containing the section.</td></tr><tr><td>**Errors**</td><td>[**StringsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/stringscollection.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Returns a collection of error descriptions for the latest call of the **Check** method.</td></tr><tr><td>**Fields**</td><td>[**FieldDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinitions.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Returns a collection of fields of the section.</td></tr><tr><td>**FlexibleDescription**</td><td>[**FlexibleDescription**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/flexibledescription.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Provides access to the flexible description of the section. If there is no flexible description in the section, the property returns 0.</td></tr><tr><td>**Id**</td><td>[**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only</td><td>Returns the identifier of the section.</td></tr><tr><td>**IsEnabled**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md)</td><td>Specifies if the section is to be used for Document Definition matching. This property set to FALSE excludes the section from document processing.</td></tr><tr><td>**IsFlexible**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only</td><td>Specifies if the section is defined in a flexible description. If the value of this property is TRUE, the name of the field cannot be changed.</td></tr><tr><td>**IsRepeatable**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only</td><td>Indicates if the section can be repeated in the document, i.e. several corresponding [field instances](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldinstances.md) can appear in the document after the section definition is applied.</td></tr><tr><td>**IsValid**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only</td><td>Specifies if the section is valid. The section is valid if there is no errors in it and it has not been changed since the latest call of the **Check** method.</td></tr><tr><td>**LinkedDocumentDefinition**</td><td>[**DocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md), read-only</td><td>Returns the corresponding document definition, if the **Type** property is set to TST\_DocumentDefinitionLink. Otherwise returns NULL.</td></tr><tr><td>**Name**</td><td>[**String**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md)</td><td>Stores the name of the section.</td></tr><tr><td>**NlpModels**</td><td>[**NlpModels**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/nlpmodels.md), read-only</td><td>Provides access to the NLP models.</td></tr><tr><td>**Pages**</td><td>[**PageDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/pagedefinitions.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Returns a collection of pages of the section.</td></tr><tr><td>**TrainingFields**</td><td>[**FieldDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinitions.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Allows you to get the collection of the field definitions which can be trained. Only the field definitions that can have regions may be trained (see the [**CanHaveRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinition.md#canhaveregion) property of the [**FieldDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinition.md) object).For field definitions with children, only child field definitions that can have regions will be included in the collection and trained when you call the [**Train**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldsextractiontrainer-train.md) method of the [**FieldsExtractionTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldsextractiontrainer.md) object.</td></tr><tr><td>**Type**</td><td>[**TemplateSectionTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/templatesectiontypeenum.md), read-only</td><td>Specifies if the object is a simple section or a link to a document definition.</td></tr><tr><td>**UseOwnRecognitionParams**</td><td>[**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md)</td><td>Specifies if the section should be recognized with the parameters of the Document Definition and **not** use the parameters loaded from a flexible description created in ABBYY FlexiLayout Studio.The Document Definition parameters may override the flexible description settings for:<ul><li>barcode pre-recognition ([**IDocumentDefinition::BarcodeBaseRecognitionParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md))</li></ul></td></tr><tr><td>**Warnings**</td><td>[**StringsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/stringscollection.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)</td><td>Returns a collection of warnings descriptions for the latest call of the **Check** method.</td></tr></tbody></table>

## Methods

| **Name** | **Description** |
| - | - |
| [**Check**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinition-check.md) | Checks if section properties were configured correctly. |
| [**LoadFlexibleDescription**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinition-loadflexibledescription.md) | Loads a flexible description from the specified ABBYY FlexiLayout Studio file. |
| [**LoadFlexibleDescriptionFromStream**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinition-loadflexibledescriptionfromstream.md) | Loads a flexible description from stream. |
| [**LoadXFDDescription**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinition-loadxfddescription.md) | Loads a form from the specified XML Form Definition file. |

## Related objects

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

## Output parameter

This object is the output parameter of the following methods:

* [**Item**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/item.md) and [**AddNew**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitions-addnew.md) methods of the [**SectionDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitions.md) object.
* [**Item**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/item.md) method of the [**SectionDefinitionsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitionscollection.md) object.

## Input parameter

This object is the input parameter of the following methods:

* [**ForceApplyDocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch-forceapplydocumentdefinition.md) method of the [**Batch**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/batch.md) object
* [**Add**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/add.md) method of the [**SectionDefinitionsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/sectiondefinitionscollection.md) object

## Samples

This object is used in the following code samples: [Classification](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#classification), [Invoices Processing and Training](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining).

## See also

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

[Creating Document Definitions](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/creatingdocumentdefinitions.md)

[Working with Properties](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md)
