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.
-
On the Tekla Structures File menu, click Editors > Template editor.
You can also open Template Editor from the Windows Start menu.
- In Template Editor, click File > New.
-
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.
-
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.
-
Set or modify the template page
settings and margin settings:
- Double-click the template to open the Template Page Properties dialog box.
- 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.
- Click OK to save the changes.
- To add a page header row in the template, click Insert > Component > Page header .
-
Add the necessary text labels to
the page header.
- Select the page header and click the Text button on the toolbar.
-
Type the needed text and
click OK.
- Pick a location for the text in the page header.
-
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:
-
Modify the text properties.
- Double-click a text label in the page header.
-
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.
- Click OK.
-
Add the necessary value fields
to the page header.
- Select the page header, click Insert > ValueField and pick a location for the value field in the header.
- Select an attribute to add in the value field from the list of available attributes.
- Click OK.
- 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.
-
Modify the value field properties.
- Double-click a value field in the page header or in the content browser on the left.
-
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.
-
Add new rows in the template.
- Click Insert > Component > Row.
-
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.
-
Add value fields to get the required data from your Tekla Structures database.
- Click Insert > Value field.
-
Pick a location for the value field in the row.
The Select Attribute dialog box is displayed.
- Select an attribute from the list and click OK.
- 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.
- To add a page footer row in the template, click Insert > Component > Page footer .
-
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.
-
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: -
Save the template.
- Click File > Save as.
-
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
orXS_PROJECT
. - In the File name field, enter a name for the template.
- Click OK.
Here is an example of the part list report.