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

# Build a FlexiLayout

> Build a FlexiLayout to check it for errors in element properties, block references, and FlexiLayout language code before applying or exporting it.

**FlexiLayout building** is the process in which ABBYY FlexiLayout Studio checks a FlexiLayout for errors, including errors in search areas, additional search criteria, the properties of the FlexiLayout blocks, and the element properties that contain the parameters of search objects.

## What the building process checks

FlexiLayout building validates the element properties, the block properties, and the expressions written in the [FlexiLayout language](/flexi-capture/fls/code/general-code).

### Element properties

The [properties of an element](/flexi-capture/fls/template/elements-properties) and its [search constraints](/flexi-capture/fls/template/search-constraints) can link only to elements located above this element in the FlexiLayout tree. FlexiLayout Studio highlights any element that does not meet this requirement as faulty.

### Block properties

Blocks cannot refer to non-existent or [disabled elements](/flexi-capture/fls/template/exclude-element).

### FlexiLayout language expressions

On the **Advanced** tab, the build checks that:

* The code has no syntax errors.
* Additional constraints in the [Advanced pre-search relations](/flexi-capture/fls/template/advanced-pre-search) field refer only to elements located above the given element in the FlexiLayout tree.
* Additional constraints in the [Advanced post-search relations](/flexi-capture/fls/template/advanced-post-search) field refer only to the element itself and to elements located above the given element in the FlexiLayout tree. FlexiLayout Studio highlights any element that breaks these two rules as faulty.
* All [global constants](/flexi-capture/fls/code/global-constant) used in the code are specified.
* All variables used in the code are declared and initialized.
* The code refers only to entities available in the corresponding sections of the code.
* Block properties refer only to the regions of elements.
* For an element of a particular type, you can specify only the properties available for that type. For example, you cannot specify **Max width** for a **Static Text** element.

## Build a FlexiLayout manually

Click **Build FlexiLayout** on the FlexiLayout's shortcut menu.

<h2 id="errors-tab">
  Errors and warnings
</h2>

<Note>
  A FlexiLayout is built automatically before it is applied to an image, saved, or exported. If errors are detected when building a FlexiLayout, the blocks and elements with errors will have icons with red Xs next to them in the FlexiLayout tree, and the **Errors** tab containing error information will appear in the properties dialog boxes of the elements with errors.
</Note>

Notifications on the **Errors** tab have red or yellow flags next to them. A red flag indicates an error. A yellow flag indicates a warning.

If at least one element or block produces an error, the FlexiLayout cannot be applied to images or exported. Warnings only draw your attention to potentially problematic type conversions and do not prevent the FlexiLayout from being applied to images or exported.

If some code on the **Advanced** tab causes a notification on the **Errors** tab, you can jump to the operator that caused the problem by double-clicking the notification.
