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

# PageDefinition オブジェクトの DetectBlocks メソッド

このメソッドは、指定した領域内で指定した型のブロックを検出し、ページ定義に追加します。なお、すべてのブロックが正しく検出されるとは限りません。

## 構文

```vb Visual Basic .NET theme={null}
Sub DetectBlocks( _
  Region As Region, _
  AutodetectBlockTypes As IntsCollection _
)
```

```cpp C++ theme={null}
HRESULT DetectBlocks(
  IRegion*          Region,
  IIntsCollection* AutodetectBlockTypes
);
```

## パラメーター

**Region**

\[in] ブロックの新しい領域を指定する [**Region**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/region.md) オブジェクトを参照します。

**AutodetectBlockTypes**

\[in] 検出対象となるブロック型のコレクションを参照する変数です。このコレクションは、**Integer** にキャストされた [**BlockTypeEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/blocktypeenum.md) の定数で表されます。

## 戻り値

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

## 関連項目

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