How to use templates created with newer versions
If you've created a template that you want to use in older versions as well, you may notice that the template is not appearing in the drawing. And if you try to open the template with older version's Template editor, you may get error messages such as below:
To work around these errors, you can simply delete the properties that were added in newer Template editor versions, by opening the file in Notepad and erasing the lines containing the attributes. Obviously these settings are then not applied in the converted template.
In case of the second picture, the error message points out the lines that you need to remove in the file, but if not, here is a list of added features that are present in template files created with versions after Tekla Structures 2017:
Note:
Since version 2023, Template editor File menu has a new command Save as version.. with which you can save the template/report into an earlier version
2017i
Organize data in columns
You can now organize data in columns that start from top left, top right, bottom left or bottom right. These settings can be modified in the Row Properties dialog box. To use columns, select the Use columns check box, and then define the order:
This feature is written on template attribute fillstartfrom.
Support for multiple lines of values
You can now enter multiple lines of values in the Name field in the Value Field Properties dialog box. You also need to enter the number of lines. The lines will be reserved even if you do not enter multiple lines.
To get the end result to go to multiple lines press Enter at the end of the row.
"Profile:" + "\n"
+ GetValue("PROFILE")
If you do not press Enter , and if the value does not fit in one value field cell due to length limitations, the value continues to the next line if you have set the line count to more than 1 and the row height allows that.
This property is written in valuefield attribute maxnumoflines.
Back to top2018
Use page headers/footers as column headers/footers
You can now use page headers as column headers in template output. To do this, select the new page header component option Use columns. Page footers can also be used as column footers.
These properties are written in pageheader and pagefooter attribute usecolumns.
2020
Override rules for template object colors
Template object colors can now be overridden in row rules by defining an override parameter for the Output() function. For more information, see “Overriding template object colors with row rules in Template” in Template Editor 4.0 User's Guide.
The following rule overrides the colors when the LENGTH attribute is longer than 1000. Value fields are orange, text objects are yellow and the drawing color is blue (i.e. lines are blue).
Choose from the 14 colors that you can use in Template Editor. Valid color names are black, white, red, green, blue, cyan, yellow, magenta, brown, darkgreen, navyblue, greenblue, orange and gray. The color names are case-insensitive.
For this feature, template attribute colors is added in the .tpl files.
Align multi-line value to top
Multiline value field should have its content attached to the top, so the data is filled from top to bottom. Default will remain from bottom so as not to break old behavior.
This property is written in valuefield attribute aligncontenttotop
Back to top2021
Improvement in graphical field output
In Graphical Field Properties, you can now select whether to always output a graphical field (Always visible) or output the field based on a rule defined for the field (Visible). The result of the rule needs to be either true or false.
These properties are written in graphicalfield attributes isalwaysvisible and visibilityrule.
2023
Visibility rules for shape and text objects
You can now define a visibility rule for shape and text objects. The rule result should be either true or false.
These settings are stored in text, lineorarc, polyline, circle and rectangle attributes isalwaysvisible and visibilityrule
Disable page breaks
Previously, if you did not want any page breaks in the template output, you needed to set the page height to a big value. Now you can define in the page properties that the template does not output page breaks.
This setting is stored in template attribute usepagebreaks
Back to top2024
Custom colors in Template editor
Template Editor templates now support custom colors, and Template Editor is able to use the same custom color palette files that you use for drawing objects and printing.
These color settings are stored in
- text and valuefield attribute fontcolor_argb
- lineorarc, polyline, circle and rectangle attribute color_argb
New font height metric option for templates: CAP height
You can now use CAP height as the font height metric. If you want to use CAP height in a specific drawing template, you need to select the Use font CAP height option in the page properties of the particular template and then adjust the template content as necessary to correct any overlapping fields.
This setting is stored in template attribute usefontcapheight