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

# AddNewFixed Method of the DocumentDefinitions Object

This method creates a new Document Definition for structured documents (also known as *fixed forms*) and adds it at the end of the collection. It also searches for the blocks of specified types on the images of the sample set and adds these blocks to the Document Definition. Typical use of this mechanism would be to detect separators and anchors on the form.

After the Document Definition is added, manually mark up the blocks with data, their types and extraction parameters using the [**DocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md) object properties and methods.

## Syntax

```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
);
```

## Parameters

**Name**

\[in] This variable specifies the name of the Document Definition. This parameter may be 0 or an empty string. In this case the name is generated automatically.

**Images**

\[in] The file paths for a sample set of form images, put into a [**StringsCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/stringscollection.md) object.

**AutodetectBlockTypes**

\[in] The types of blocks that should be detected on the sample images, as a [**BlockTypesCollection**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blocktypescollection.md) object. This parameter is optional and may be **null**, in which case only the anchors will be detected.

It is best to use some of the BT\_Separator, BT\_Anchor, BT\_StaticText, BT\_StaticBarcode, BT\_Checkmark block types for this parameter. These block types usually correspond to objects and text that are always in the same place on each filled-in form, which will help to determine the form structure.

> [!NOTE]
>
> The [anchors](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blocktypeenum.md#anchor) will always be detected, regardless of this parameter value.

**Result**

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

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

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