- When you create a Table element, you need to ‘bind’ it to an already created Table block, so you usually need to create the block first. You can first specify its approximate search area, and then create one or more elements to look for the block, and then use these Table elements to finalize the search area of the block.
- You can create several elements, each of which describes its own algorithm for finding one and the same Table block. You can instruct the program to select the Table element which best fits the table block after the block has been found. This is done by means of a Region expression.
Create a Table block
1
Switch to the FlexiLayout window
2
Select the Blocks branch
Select the Blocks branch in the FlexiLayout tree.
3
Add a Table block
From the FlexiLayout menu, select Add Block → Table; or select New → Table from the shortcut menu.
4
Set the block properties on the Table block tab
Specify:
- The name of the block.
- An optional comment.
- If the block region and the division of the table into rows and columns coincide with the region returned by a Table element, select the Source element option and click
. In the Select Element dialog box, select the Table element whose region coincides with the region of the block, and then click OK. - If the block region does not coincide with the region of any Table element, select the Region expression option and enter the required code in the Region expression field. Click Check to check the code.
5
Specify the columns on the Columns tab
Specify the columns that may occur within the block:
- Click Add… and enter the name of a column. It is convenient to use the column names as they occur on the test images.
- From the Type drop-down list, select the type of the column: Text, Barcode, Checkmark, Picture, or Non-Recognized Block.
- To change a column’s name or type, click Edit… and, in the Edit Table Column dialog box, enter a new name or select a different type.
- Use the
and
buttons to arrange the columns in the order in which they must occur in the data capture application.
Example: specify which block region to select
To specify the region of a block, use the pre-defined variableOutputTable of type TableHypothesis.
The code in the following example selects the Table element in which the most rows have been found:
The table elements
SearchElements.TableElement1 and SearchElements.TableElement2 in the example must refer to the same Table block whose Region expression field contains the above code.