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

# AddNew Method of the BlockDefinitions Object

This method adds a block definition at the end of the collection.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew( _
  Type As BlockTypeEnum, _
  Region As Region, _
  Name As String _
) As BlockDefinition
```

```cpp C++ theme={null}
HRESULT AddNew(
  BlockTypeEnum      Type,
  IRegion*           Region,
  BSTR               Name,
  IBlockDefinition** Result
);
```

## Parameters

**Type**

\[in] This variable of the [**BlockTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blocktypeenum.md) type specifies the type of the block.

> [!NOTE]
>
> The Type parameter can not be BT\_Unknown or BT\_Page.

**Region**

\[in] This variable refers to the [**Region**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region.md) object that contains the region of the block. Region must not be NULL.

**Name**

\[in] This variable specifies the name of the block.

**Result**

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

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

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