Create a textual template

Tekla Structures
Tekla Structures

Create a textual template

Textual templates (.rpt) only contain text. They are primarily used for creating reports or listings of Tekla Structures specific objects, for example, in material lists of construction assemblies.

We will create a simple part list as an example of a textual template. First, we will add a page header with a report description and date information, then a row for the part list, and finally a page footer for summarizing the part data.
  1. On the Tekla Structures File menu, click Editors > Template editor.
  2. In Template Editor, click File > New.
  3. Select Textual template.

    To create a new template based on a pre-defined template, select a file from the pre-defined templates section in the Template types dialog box.

  4. Click OK.

    An empty template opens in the template work area, and you can start adding content. If you selected a pre-defined template, the work area contains the pre-defined content.

  5. Set or modify the template page settings and margin settings:
    1. Double-click the template to open the Template Page Properties dialog box.
    2. In the Output, Workarea, and Margins areas, modify the following:
      • Width and Height: Set in characters. The option to use page breaks if the page height is exceeded is selected by default. If this is not selected, no page breaks appear in the output.
      • View height: Set the page height in characters for template design, but does not affect template output.

      • Margins: Set the margins for the left, right and bottom of the template in characters.

    3. Click OK to save the changes.
  6. To add a page header row in the template, click Insert > Component > Page header .
  7. Add the necessary text labels to the page header.
    1. Select the page header and click the Text button on the toolbar.
    2. Type the needed text and click OK.

    3. Pick a location for the text in the page header.
    4. Add other text labels in the same way.
      For example, add a label for the report name, page number, and date, and column header labels for the part list that will be placed under the page header.

    Here we have added some text labels to the header, including the column header labels for the part list:

  8. Modify the text properties.
    1. Double-click a text label in the page header.
    2. Modify the necessary properties.

      You can change the color of a text object. To do this, double-click a text object in the template, and in the object properties, click the button next to the font setting. Then click the color box and select a standard color or a custom color.

    3. Click OK.
  9. Add the necessary value fields to the page header.
    1. Select the page header, click Insert > ValueField and pick a location for the value field in the header.
    2. Select an attribute to add in the value field from the list of available attributes.
    3. Click OK.
    4. Add other value fields in the same way.

    We have added some value fields and attributes to the page header: PROJECT.NUMBER, PROJECT.NAME, PAGE, and DATE.

  10. Modify the value field properties.
    1. Double-click a value field in the page header or in the content browser on the left.
    2. Modify the value field properties.

      Pay attention to the content browser on the left while you are adding content to the template. It shows you the added content objects and allows you to quickly select and work with the content objects. When you select an object from the content browser, the object is also selected in the template.

  11. Add new rows in the template.
    1. Click Insert > Component > Row.
    2. Select a content type for the row, and click OK.

      The content type that you select affects the template attributes that you can add in the value fields. In this example, we will select PART.

  12. Add value fields to get the required data from your Tekla Structures database.
    1. Click Insert > Value field.
    2. Pick a location for the value field in the row.

      The Select Attribute dialog box is displayed.

    3. Select an attribute from the list and click OK.
    4. Add the rest of the needed value fields and attributes in the same way.

    Here we have added the following template attributes to the row: PART_POS, PROFILE, NUMBER, MATERIAL, ,LENGTH, AREA, and WEIGHT.

  13. To add a page footer row in the template, click Insert > Component > Page footer .
  14. Add the necessary text labels and value fields to the page footer in the same way as you added to the header, and modify the properties if necessary.

    We have added some text labels and value fields to the page footer: NUMBER_TOTAL, AREA_TOTAL, and WEIGHT_TOTAL.

  15. Finalize the template.

    When you have the desired content in the template, you can make the template look nicer by repositioning labels and value fields, cropping some rows, or adding lines to separate the rows. Cropping removes any unnecessary space from around the rows.

    • To crop the page header row, part row, or page footer row, select the row, right- click, select Crop, and then select the desired crop option.
    • Drag the text labels and value fields to reposition them if necessary.
    • Add lines in the template between rows. In textual templates, you can use Text objects to add dashed lines (- - - - - -) between the rows.
    Here is the final template content:

  16. Save the template.
    1. Click File > Save as.
    2. Save the template in the model folder. If you want to use the template in other projects as well, save the template in the template folder defined for the advanced option XS_FIRM or XS_PROJECT.
    3. In the File name field, enter a name for the template.
    4. Click OK.

Here is an example of the part list report.

Tip: Another way to create a new template is to open an existing template in Template Editor, modify the template as required, and save the template with another name.
Was this helpful?