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

# DocumentDefinitions オブジェクトの AddNewFixed メソッド

このメソッドは、構造化文書 (*定型帳票*とも呼ばれます) 用の新しい Document Definition を作成し、コレクションの末尾に追加します。また、サンプルセットの画像上で指定された型のブロックを検索し、検出したブロックを Document Definition に追加します。この仕組みは主に、フォーム上の区切り線やアンカーの検出に使用されます。

Document Definition の追加後は、[**DocumentDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition.md) オブジェクトのプロパティとメソッドを使用して、データを含むブロックとその型、抽出パラメーターを手動でマークアップします。

## 構文

```vb Visual Basic .NET theme={null}
Function AddNewFixed(
  Name As String, _
  Images As StringsCollection, _
  AutodetectBlockTypes As BlockTypesCollection, _
) As DocumentDefinition
```

```cpp C++ theme={null}
HRESULT AddNewFixed(
  BSTR                  Name,
  IStringsCollection    Images,
  IBlockTypesCollection AutodetectBlockTypes,
  IDocumentDefinition** Result
);
```

## パラメーター

**Name**

\[in] この変数には、Document Definition の名前を指定します。このパラメーターには 0 または空文字列を指定できます。その場合、名前は自動的に生成されます。

**Images**

\[in] フォームのサンプル画像セットのファイルパスを、[**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md) オブジェクトに格納して指定します。

**AutodetectBlockTypes**

\[in] サンプル画像上で検出するブロックの型を、[**BlockTypesCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/blocktypescollection.md) オブジェクトとして指定します。このパラメーターはオプションで、**null** を指定することもできます。その場合は、アンカーのみが検出されます。

このパラメーターには、BT\_Separator、BT\_Anchor、BT\_StaticText、BT\_StaticBarcode、BT\_Checkmark のうちいくつかのブロック型を指定することをお勧めします。これらのブロック型は通常、記入済みのどのフォームでも常に同じ位置にあるオブジェクトやテキストに対応するため、フォーム構造の判定に役立ちます。

> [!NOTE]
>
> [アンカー](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/blocktypeenum.md#anchor)は、このパラメーターの値にかかわらず常に検出されます。

**Result**

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

## 戻り値

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

## 関連項目

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