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

# サンプル 2. Step 24: CookingDescription ブロックの作成

> 要素の矩形を結合して非矩形の OutputRegion を作成する FlexiLayout language の式を使って、調理手順ブロックを組み立てます。

CookingInstructions ブロックを作成するには、次の手順を実行します。

1. プログラムのメインウィンドウで **FlexiLayout** タブをクリックします。
2. FlexiLayout ツリーで **Blocks** オブジェクトを選択します。
3. **FlexiLayout** メニューまたはショートカットメニューで **Blocks → Add Block →** Text を選択します。
4. Properties ダイアログで、Name field にブロック名 **CookingInstructions** を指定します。
5. ブロックの位置を記述するには、Expression を選択します。
6. ブロックの位置は、調理手順と人数のみが含まれるように記述する必要があります。ブロックには不要なテキスト (つまり、"Serves" という単語の前にある可能性のあるテキスト) を含めてはいけません。ブロックは、**CookingDescription**、**Serves**、**Servings** の各要素を囲む矩形のコレクションとして記述します。このメソッドを使用すると、非矩形の領域を指定できます。
   [FlexiLayout language](/ja/flexi-capture/fls/code/general-code) では、これは次のように記述します。
   `RectArray outputRectArray;`
   `//空のコンストラクターを使用して変数を初期化する`
   `outputRectArray = RectArray();`
   `//3 つの要素の仮説の矩形を追加する`
   `outputRectArray.Add ( SearchElements.Cooking.Description.CookingInstructions.Rect );`
   `outputRectArray.Add( SearchElements.Cooking.Description.Serves.Rect );`
   `outputRectArray.Add( SearchElements.Cooking.Description.Servings.Rect );`
   `OutputRegion = Region( outputRectArray );`
