Configure Table rule - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

This rule is used to extract information from a table within the pdf file. The TableRule is created to identify the end of the table.

2018-02-26_12-50-32

In the previous example image, the following steps were used to define the table rule:

  1. To extract the table content present in the annotated area, the TableRule is defined as follows:

    RT=TR|TABLENAME='TABLE01'|TO=TD|RepTab=True|Trim=True|MultiPage=True|NoOfPages=5.

    Abbreviation

    Description

    RT

    Rule Type which can be TR (Table Rule) or TCol (Table Column) based on the annotated area.

    TABLENAME

    Defined as "TABLE01". For columns, attribute names (Attr) are defined.

    TO

    Target Object which is defined as Tag Data (TD). By setting this, you can extract data from the table as tag data.

    RepTab

    Repeat Table, by setting this parameter to True, you can apply the table rule to another table with the same co-ordinates in the PDF file.

    • Trim is set to True to remove the spaces from the extracted text.

    • MultiPage is set to True to apply this rule to the table if it is continued in multiple pages. After setting MultiPage to True, you must set the NoOfPages required to extract the data from the table.

    For further information on the list of available keywords, in the Associate Templates for Template Group pane, click PDF Template Keywords.

  2. After defining the table rule, you can define the rules for the selected columns in the table by annotating the column headers to extract the data.

    The column header cell annotation area must be the same as the area of the data cell present in the column.

    For example, the TableRule for each selected table column is defined as follows:

    Table column

    Table rule

    ItemNÂș

    RT=TCol|Attr=Name|TO=TD|RepTab=True|Trim=False|MultiPage=False|NoOfPages=5

    EquipmentDescription

    RT=TCol|Attr=Description|TO=TD|RepTab=True|Trim=False|MultiPage=False|NoOfPages=5

    Operating Conditions (Temp[ÂșC])

    RT=TCol|Attr=SCROperatingTemperature|TO=TD|RepTab=True|Trim=False|MultiPage=False|NoOfPages=5

    Operating Conditions (Pressure[kg/cms2g])

    RT=TCol|Attr=SCROperatingPressure|TO=TD|RepTab=True|Trim=False|MultiPage=False|NoOfPages=5

In the Associate Rules for Template pane, configure the table as follows:

  1. Select the Rule Type as TableRule.

  2. Select the target object from the Target Object list.

    If the Table has no target object set, then the target object is considered on any random column.

  3. Click Configure Rule Configure Rule_Preprocessor Utility to open the Editing Rule for <Rule Name> window, and then edit the rule as follows:

    • Select Multi Page to apply this rule to multi pages and type the number of pages in NoOfPages text box.

    • Select Repeat Table, to apply this table rule to another table present at the same coordinates.

    • Select Trim Text check box to remove the spaces from the extracted text.

      You can add a prefix and separator to the data to be extracted by typing any custom text in the Prefix box and any character in the Separator box.

      Alternatively, you can include a prefix and separator by configuring a rule for the annotated area in the pdf template file.

      For example: RT=TCol|Attr=Name|TO=TD|RepTab=True|Trim=False|Sep=\|Prefix=TAB|MultiPage=False|NoOfPages=5