Template Editor: Tekla Structures 11.0 Basic Training April 21, 2005
Template Editor: Tekla Structures 11.0 Basic Training April 21, 2005
Template Editor: Tekla Structures 11.0 Basic Training April 21, 2005
Contents ................................................................................................................................. i
In this lesson You will learn how to work with Template Editor. You will create a new textual template
from scratch. You will also create two graphical ones – one by converting an old template
and one by converting an AutoCAD block into a new template. There are links to help files
in the text. It is recommended to read the help file for more detailed descriptions.
What are Templates are descriptions of forms and tables which can be included in Tekla Structures.
templates? The forms can be graphical to be included in drawings as tables, text blocks, drawing
headers, or ASCII text form to be used as reports. The contents of the template fields are
filled in by Tekla Structures using the templates at run time. Templates are created and
edited with Template Editor, which is a separate application in Tekla Structures and can be
run also standalone.
Create a new 1. We will first create a textual template to be used in report creation, which will list bolts,
template washers and nuts belonging to parts in an assembly. Create a new template by clicking
on the New icon, or by selecting New from the File menu, or by typing Ctrl + N.
Insert template 1. Insert the template header and page header components by clicking on the "Header" and
components "Page header" icons on the Component toolbar.
2. Insert the row components. For each row, after clicking on the "Row" icon in the
Component toolbar, select the content type (assembly, part, bolt, …) from the drop-
down list and click OK.
Each row usually represents an object from the Tekla Structures database. The
content type defines what kind of data can be read into the row. Only the object
specific attributes are available for each content type.
The components appear in the template work area and are listed in the content browser on
the left.
Edit the template 1. Next, give a descriptive name for the rows - Steel_assembly, Part, Bolt, Washer, Nut -
components by selecting the row in the content browser and typing the name.
Select the Part row and click on the Shift row down a level button in the content
browser.
3. Then shift the Bolt, Washer and Nut rows below the Part row by selecting the row and
clicking twice on the shift button.
Insert objects into Next, insert the template objects inside the components. In textual templates you can only
header use text strings and value fields. Read more about template objects in TempEd Help:
Template Editor > Working with template objects
1. First, insert text into the header by selecting Text in the Insert drop-down menu or by
clicking on the corresponding A icon and typing the text in the Enter text dialog.
3. Next put a value field next to the text by selecting Value Field in the Insert drop-down
menu or by clicking on the corresponding Value Field icon and then point the position.
Read more about value fields in TempEd Help: Template Editor > Working with
template objects > Value fields.
5. Double-click on the value field and type a descriptive name for the value field in the
Value Field Properties dialog's Name field.
You can open several templates simultaneously and copy-paste objects from
one template to another. The Value Field Properties dialog can be opened also
by double-clicking on the field name inside the content browser.
7. Select the DATE and TIME value fields and align them using the right mouse button
command Align > Rights.
Insert objects into Insert texts into the Page Header according to the example below.
page header
Note: the Value Field names must be unique in every row. For example, if
you use the attribute NUMBER in different rows you should give a different
name in the Value Field Properties dialog for each value field:
NUMBER_of_assemblies, NUMBER_of_parts, etc.
Insert objects into Insert texts and a value field "PAGE" into the Page Footer according to the example below.
page footer
Insert objects into 1. Insert texts into the Footer according to the example below.
footer
Between the texts, add a value field which counts the total number of assemblies. Copy (Ctrl
+ C) the name of the value field to be counted from the content browser and open the Value
Field Properties dialog.
5. Paste the name of the value field "NUMBER_of_assemblies" inside the quotation marks
(you can also select it from a list which opens by clicking on the Select button), then
click the Check button to verify the syntax.
Sorting
When the value fields are placed inside the template components, the next step is to define
the sorting of the fields and rows. The sorting is done at three levels:
• Inside the value field alpha-numerically ascending or descending (A to Z or Z to A).
Sorting of value field distinguishes all different values of the field and a new row will be
written to each different value.
• Between the value fields according to the appearance order in the Content Browser
by sort order priority. The sort priority determines how several value fields affect the
sorting of a row. Read more about value field sorting in TempEd Help: Template Editor
> Working with template objects > Value fields > Set sort priority of value fields.
Note: When you want to sum value field values, make sure that the sort type of
the row containing the value field is Combine. This ensures that your will be
outputting only summary lines instead of repeating lines with information on
individual database objects. Read more about summing field values in TempEd
Help: Template Editor > Working with template objects > Value fields > Sum
field values automatically.
Define sort order Define first the sorting inside the value fields.
inside value fields
1. Double-click on the "Assembly_position" value field in the content browser or inside
the template component and set the order to be "Ascending". The field values are sorted
alphabetically from A to Z, which can be seen in the content browser as an arrow.
1. Select the Assembly_position value field in the Content Browser and click on the
Move item up button. You can also drag and drop the value field into a new location.
The assemblies become sorted first by assembly position number, then by amount of
assemblies.
2. Repeat for all value fields in the following rows as shown in the example below:
3. Click OK.
4. Repeat for all other rows.
Summing
When the row's sort type is set to "Combine", the value field can be summed. Value field
summing has three options:
• "Sum values across all rows" gives a total sum of all identical value fields in the
whole template, independent of the hierarchical structure of the rows.
• "Sum values within one row" gives a sum of identical value fields inside the
hierarchical structure.
5. Define the summing of the number of bolts, washers and nuts using the Sum values
within one row summing option.
Rules
The row rule is used if a row is to be output only under some special conditions. Read more
about rules in TempEd Help: Template Editor > Working with formulas and rules.
In this example template, we want to list only workshop bolts and leave site bolts out.
Therefore, a rule is needed to separate them and output only the shop bolts.
1. Double-click on the Bolt row in the content browser or the corresponding component
border to open the Row Properties dialog.
2. Click on the Wizard button to open the Rule Wizard.
3. First, select the attribute by clicking on the None button, which opens the Select
Attribute or Value Field dialog.
Height
Next, edit the template component heights to fit the contents by selecting the component
handle in the middle and dragging them.
2. Select the file assembly_part_list.tpl from the browser. It should be located in the
Template folder of your environment folder of the Tekla Structures program folders.
Template Editor automatically recognizes an old file and prompts you to convert it to the
new format.
3. Click Yes.
5. Click OK. The converted template is opened with an info dialog about the grid spacing
and a list of warnings is displayed. Read more about warnings in TempEd Help:
Template Editor > Template conversion > Template conversion warnings.
2. Define the hierarchy of the rows by shifting the part row down a level. See the previous
section and Appendix I on how to define the hierarchy.
3. Edit component rules. As the content type of the row is now defined in the Row
Properties dialog, rules are no longer needed to define it. Therefore, the unnecessary
rules can be removed. Open the Row Properties dialog and click on the Advanced…
button.
4. It is advisable to load the default settings for the attribute as prompted on the dialog.
5. Define the sorting of the value fields after conversion, where needed. See the previous
section for detailed sorting instructions. The same sorting rules apply to converted value
fields as to those created by the user:
• Check the alphabetical sorting of the value fields in the content browser and change the
ascending / descending values if needed.
• See the appearance order of value fields in the content browser and shift them to the
correct location. The current order is converted according to the sorting order in the old
template.
• Also check whether similar rows need to be displayed.
You can rename the objects directly in the content browser, without opening
the properties dialog.
7. Align the value fields with text objects. First, select the objects and then right-click and
Align > Lefts.
8. Go through the summing value fields in the footer. Change the formulas to have the
correct value field names inside the brackets and quotation marks. See the previous
section for more information.
Graphical objects Next, edit the colors of all border lines in the template.
1. Select all lines by picking them while holding down the Shift key.
2. Right-click and select Properties… .
3. Change the color to yellow.
2. …and selecting the file to be converted: this time the file assembly_bolt_list.tpl.
Hierarchy The whole hierarchy of the objects must be defined in the template (see appendix I) in order
to get the data of sub-rows. In this example bolts are attached to some part, not to the
assembly directly. Therefore, an additional row is needed between the assembly and bolt
rows.
1. In the components toolbar select "Row".
5. Move the row up between the Assembly and Bolt rows by selecting the row and clicking
on the Move item up button.
6. Shift the Part row hierarchically down a level under the Assembly row by clicking on
the Shift row down a level button.
Visibility The Part row can now be hidden in the final output.
1. Open the Part row's properties dialog.
2. Tick the Hide in output field. The row is run, but not printed into final output.
3. Click OK.
The hidden row is displayed as a dashed line.
New objects The Part row needs some contents. Add a value field PART_POS with ascending sorting into
the row in order to have all different parts listed. It will not be visible, because the row has
the option "Hide in output".
The final template should look like this:
The hidden objects (row and value field) are displayed as dashed lines.
Insert a row and 1. Insert a single row by clicking on the Row button on the Component toolbar.
define its
properties
2. Select the content type to be "DRAWING", because we are inserting a drawing title
block.
The available attributes depend on the content type. If the file which will be
imported has attribute fields, it is essential to set the row's content type so that
the corresponding attributes are available in the template.
3. Open the Row Properties dialog and give a descriptive name for the row.
4. Set the row height to 100 mm.
5. Click OK.
4. Select the Scale radio button and set the scale to 1 – the AutoCAD block will be in scale
1:1 in the work area.
If you want to define the size, select the Dimensions radio button and enter
horizontal and vertical values.
The title block is inserted as a group of objects inside the row borders.
Ungroup the In order to edit the contents of the inserted block, you need to ungroup it first by selecting the
inserted block group and right-click > Ungroup. Read more about groups in TempEd Help: Template
Editor > Working with template objects > Editing template objects > Group or ungroup
objects.
The individual objects inside the block become editable and visible in the content browser.
2. Using area select, select all the lines which form the logo.
3. Right-click > Group. A group is created.
You can resize the group by dragging the corner handles. Group properties,
like color, can be edited on the Group Properties dialog (select the group and
right-click > Properties).
Define fonts for The fonts used in text objects are mapped to Tekla fonts. This may slightly distort the font
the texts alignment within the text object as the original font geometry is not available in Template
Editor. You need to edit the text properties.
5. Load the default settings for the attribute by clicking the Yes button.
Each template is displayed in its own window inside the work area and as a folder in the
content browser. You can cut or copy template objects from one template and paste them
into another template easily when multiple templates are open. We will next separate the
revision lines from the drawing title and create a new template for them.
1. Area select the objects – lines and value fields – which are to be cut from the drawing
title template (deselect the row by holding the Ctrl key down and picking the border).
4. Insert a row.
6. Because the area needed for pasting must be large enough, edit the template page width
to be 215 mm. Double-click on an empty area to open the Page Properties dialog.
7. Paste the objects inside the row using Ctrl + v or right-click > Paste.
The value fields and drawing lines are inserted into the new template. Now, save both
templates.
3. Select the lines, which form the upper row above the Value fields.
Insert a row and 1. Insert a single row by clicking on the Row button on the Component toolbar.
define its
properties
It is essential to have the same dimensions in the template and in the AutoCAD
file in order for the scale to be the same.
When you design your template structure, always keep in mind that the
attributes collect data directly from objects in the Tekla Structures model and
the content type of the rows determine what attributes are available. Also note
the hierarchical structure of the objects in the model and how it affects the
template.
Create template Next, insert the needed template components: header, which will have the labels, rows for
components and assembly, part and bolt data and some rows for empty space. Click on the "Header" and
define content "Row" button on the Component toolbar and define the content types for the rows:
types assembly, part and bolt – leave two row's content type undefined.
Divide AutoCAD Now, we can start putting the template objects into the components. Start by ungrouping the
block contents AutoCAD block.
into template
components 1. Select the block.
2. Right-click > Ungroup.
Cut the objects from the block and paste them into the components which you have created.
2. Then cut and paste the texts and lines which belong to the assembly row.
4. Then move the bolt "header" information into the empty content type row.
6. And finally contents of one single, empty row – just the lines, without any texts.
Then copy and paste the last empty row with the contents into the template and lift the new
row up under the assembly row using the Move item up button in the Content Browser.
Insert value fields When the template components are filled with the correct objects from the AutoCAD block,
we will replace the texts inside the rows with value fields, which will collect data
automatically from the Tekla Structures model. When deciding what attributes should be
used, note the content type of the row and the label in the header, which refers to the contents
of the value field. Read more about attribute descriptions in Tekla Structures Help: System >
Appendix D: Template fields.
1. Start with the assembly row and select the number under QTY.
2. Delete it.
3. Pick the value field icon and point the location inside the Assembly row. A list of
assembly related attributes opens in a separate dialog.
4. Select the NUMBER attribute.
5. Continue with the "Ship mark" by deleting the text and inserting a value field which has
the ASSEMBLY_POS attribute.
6. Complete the row by replacing the texts with the corresponding value fields.
Set rules for rows After component objects are in place, you can define the rules for rows. We will next use the
using Wizard rule wizard for creating an "if–then–else" statement for the bolt title row to place the row into
the 23rd row of the page.
1. Open the Row Properties dialog of the row having the bolt title information.
CAST UNIT
PART
SURFACING
REBAR
MESH
BOLT
WASHER
NUT
STUD
HOLE
ASSEMBLY
PART
SURFACING
REBAR
MESH
BOLT
WASHER
NUT
STUD
HOLE
WELD
DRAWING
REVISION
DRAWING
REVISION
DRAWING
REVISION