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

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

このメソッドは、新しいエンティティ抽出モデルをコレクションの末尾に追加します。

## 構文

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

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

## パラメーター

**Name**

\[in] 新しいモデルの名前です。

**Source**

\[in] エンティティの抽出元となる field を指定する [**FieldDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fielddefinition.md) オブジェクトへの参照です。

**Language**

\[in] 抽出するテキストの言語を指定する [**Language**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/language.md) オブジェクトへの参照です。

> [!NOTE]
>
> テキストの言語がこのパラメーターで指定した言語と異なる場合、field は認識されません。その場合は、[**ExtractionModel**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/extractionmodel.md) オブジェクトの [**Language**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/extractionmodel.md#language) プロパティで言語を変更してください。

**Result**

\[out, retval] 追加されたモデルのインターフェースポインターを受け取る [**IExtractionModel**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/extractionmodel.md)\*\*\*\*\* 変数へのポインターです。

## 戻り値

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

## 関連項目

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

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