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

# AddNewSegmentationModel Method of the SegmentationModelHandler Object

This method adds a new segmentation model.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew(
  Name As String, _
  Language As Language _
) As SegmentationModel
```

```cpp C++ theme={null}
HRESULT AddNew(
  BSTR                 Name,
  ILanguage*           Language,
  ISegmentationModel** Result
);
```

## Parameters

**Name**

\[in] The name of the new model.

**Language**

\[in] Refers to the [**Language**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/language.md) object that specifies the language of the text to be extracted.

> [!NOTE]
>
> If the language of the text is different from the language specified by the parameter, then no fields will be recognized. In this case, you will need to change the language using the [**Language**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/segmentationmodel.md#language) property of the [**SegmentationModel**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/segmentationmodel.md) object.

**Result**

\[out, retval] A pointer to the [**ISegmentationModel**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/segmentationmodel.md)**\*** variable that receives the interface pointer for the added model.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

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

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