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

# Create, edit, and delete blocks

> Create, edit, and delete blocks in the FlexiLayout tree: pick a layout alternative, bind a source element or region expression, and manage properties.

## Create a new block

<Steps>
  <Step title="Switch to the FlexiLayout window" />

  <Step title="Select the Blocks branch in the FlexiLayout tree" />

  <Step title="Select the block type">
    In the **FlexiLayout** menu, select **Add Block > \[Type of block]** (or select **New > \[Type of block]** in the shortcut menu).
  </Step>

  <Step title="Specify the properties of the block">
    * In the **For layout** list, select the layout alternative where the search area is specified.

    * If the region of the block will coincide with the region of an element, select **Source element** and click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Search.gif?s=36d8764847225cffab245081f5274192" alt="Select element button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="31" height="18" data-path="images/flexi-capture/fls/Button_Search.gif" />:

      1. In the **Select Element** dialog box, select the element whose region coincides with the region of the block.
      2. If you select a repeating group as a reference element, select its instance from the **Repeating instance** drop-down list.
      3. When selecting values for `AllInstances`, select the **Has repeating instances** option in the properties of the block, since in this case the block region may be discontinuous.

          <Note>
            To facilitate recognition, the region of a text block is one dot larger in each direction than the region of the source element.
          </Note>

    * If the region of the block does not coincide with the regions of any elements, select **Expression** and enter code in the **Expression** field. Click **Check** to check the code for errors.
  </Step>
</Steps>

<Note>
  You can create blocks before you have created elements, but in this case you can specify the location of the blocks on the image only by directly entering their coordinates. However, in most cases block coordinates are unpredictable and the locations of the blocks can only be described through the locations of image objects.
</Note>

## Edit the properties of a block

<Steps>
  <Step title="Switch to the FlexiLayout window" />

  <Step title="Select the block whose properties you want to edit" />

  <Step title="Open the Properties dialog box">
    Right-click the block and select **Properties...** from the shortcut menu.

    <Tip>
      You can also display the **Properties** dialog box by double-clicking the block.
    </Tip>
  </Step>

  <Step title="Make the necessary changes">
    <Note>
      You can only change the name and region of a block. You cannot change the type of a block.
    </Note>
  </Step>
</Steps>

## Delete a block

<Steps>
  <Step title="Switch to the FlexiLayout window" />

  <Step title="Select the block you want to delete">
    To select multiple blocks, hold the **Ctrl** key and click the blocks you want to delete. To select several consecutive blocks in the branch, hold the **Shift** key and click the first and last block you want to delete.
  </Step>

  <Step title="Delete the block">
    Right-click the block and select **Delete** from the shortcut menu.
  </Step>
</Steps>
