Вы находитесь на странице: 1из 53

Tekla Structures

Template Editor

Training Manual
Product version 15.0
March 31, 2009
Copyright 2009 Tekla corporation

2009 Tekla Corporation and its licensors. All rights reserved.


This Software Manual has been developed for use with the referenced Software. Use of the Software, and use of
this Software Manual are governed by a License Agreement. Among other provisions, the License Agreement
sets certain warranties for the Software and this Manual, disclaims other warranties, limits recoverable damages,
defines permitted uses of the Software, and determines whether you are an authorized user of the Software. Please
refer to the License Agreement for important obligations and applicable limitations and restrictions on your rights.
In addition, this Software Manual is protected by copyright law and by international treaties. Unauthorized
reproduction, display, modification, or distribution of this Manual, or any portion of it, may result in severe civil
and criminal penalties, and will be prosecuted to the full extent permitted by law.
Tekla, Tekla Structures, Xcity, Xengineer, Xpipe, Xpower, Xsteel, and Xstreet are either registered trademarks or
trademarks of Tekla Corporation in the European Union, the United States, and/or other countries. Other product
and company names mentioned in this Manual are or may be trademarks of their respective owners. By referring
to a third-party product or brand, Tekla does not intend to suggest an affiliation with or endorsement by such third
party and disclaims any such affiliation or endorsement, except where otherwise expressly stated.
Portions of this software:
D-Cubed 2D DCM 2008 Siemens Product Lifecycle Management Software III (GB) Ltd. All rights reserved.
EPM toolkit 1995-2004 EPM Technology a.s., Oslo, Norway. All rights reserved.
XML parser 1999 The Apache Software Foundation. All rights reserved.
Project Data Control Library 2006 - 2007 DlhSoft. All rights reserved.
DWGdirect, DGNdirect and OpenDWG Toolkit/Viewkit libraries 1998-2005 Open Design Alliance. All rights
reserved.
FLEXnet Copyright 2006 Acresso Software Inc. All Rights Reserved. This product contains proprietary and
confidential technology provided by and owned byAcresso Software Inc. Of Chicago, Illinois, USA. Any use,
copying, publication, distribution, display, modification, or transmission of such technology in whole or in part in
any form or by any means without the prior express written permission of Acresso Software Inc. is strictly
prohibited. Except where expressly provided by Acresso Software Inc. in writing, possession of this technology
shall not be construed to confer any license or rights under any of Acresso Softwares intellectual property rights,
whether by estoppel, implication, or otherwise.
The software is protected by U.S. Patent 7,302,368. Also elements of the software described in this Manual may
be the subject of pending patent applications in the European Union and/or other countries including U.S. patent
applications 2004031231, 2004267695, 2005285881, 2006000484 and 200613639.

Contents
Contents.................................................................................................................................. i
Preface ................................................................................................................................... 1
1

Creating a New Template ............................................................................................ 3


1.1
1.2

1.3
1.4
1.5

1.6

1.7

Create a new template from scratch .......................................................................................... 3


Background ............................................................................................................................... 3
Create a template ...................................................................................................................... 3
Define template properties ........................................................................................................ 4
Background ............................................................................................................................... 4
Edit template page properties .................................................................................................... 4
Edit the graphical unit preferences ............................................................................................ 5
Insert template components and objects ................................................................................... 6
Background ............................................................................................................................... 6
Insert template components ...................................................................................................... 6
Edit the template components ................................................................................................... 7
Background ............................................................................................................................... 8
Work with components .............................................................................................................. 8
Insert objects into template components ................................................................................... 9
Background ............................................................................................................................... 9
Insert components into the header ............................................................................................ 9
Insert value fields..................................................................................................................... 10
Insert objects into page header ............................................................................................... 11
Insert objects into rows ............................................................................................................ 11
Insert objects into page footer ................................................................................................. 12
Insert objects into footer .......................................................................................................... 12
Sorting value fields and rows ................................................................................................... 14
Background ............................................................................................................................. 14
Define sort order inside value fields......................................................................................... 14
Define sort order between value fields .................................................................................... 15
Define sort order between rows ............................................................................................... 15
Summing value fields .............................................................................................................. 16
Edit the component properties ................................................................................................. 17
Background ............................................................................................................................. 17
Edit row rules ........................................................................................................................... 17
Edit the height of the template component .............................................................................. 18

TEKLA STRUCTURES TEMPLATE EDITOR


Contents

Converting an Existing File into a Template ........................................................... 19


2.1

2.2

2.3

Other Ways to Utilize Templates .............................................................................. 33


3.1
3.2
3.3

Using bitmaps in templates ..................................................................................................... 33


Background ............................................................................................................................. 33
Edit the template and insert a new bitmap ............................................................................... 33
Using templates in customized Tekla Structures part marks ................................................... 34
Background ............................................................................................................................. 34
Create a new template for part marks ..................................................................................... 34
Modifying tooltips in Web Viewer ............................................................................................. 36
Background ............................................................................................................................. 36
Open and edit a tooltip template .............................................................................................. 36
View the tooltip ....................................................................................................................... 38

Converting Templates ............................................................................................... 39


4.1

ii

Convert an AutoCAD File into a Template ............................................................................... 19


Background ............................................................................................................................. 19
Create a new template with components ................................................................................. 19
Insert the AutoCAD file and edit its contents ........................................................................... 20
Ungrouping and regrouping template objects .......................................................................... 21
Define fonts for the texts.......................................................................................................... 22
Define value fields in an AutoCAD file ..................................................................................... 23
Work with multiple templates ................................................................................................... 24
Background ............................................................................................................................. 24
Break the template into two separate templates ...................................................................... 24
Edit the new template .............................................................................................................. 25
Create a "bill of materials" template......................................................................................... 26
Background ............................................................................................................................. 26
Create a new template ............................................................................................................ 26
Insert the AutoCAD file ............................................................................................................ 27
Design the template contents and break the block .................................................................. 27
Divide AutoCAD block contents into template components ..................................................... 29
Insert value fields..................................................................................................................... 31
Set rules for rows using the Rule Wizard ................................................................................. 32

Convert old templates to new format ....................................................................................... 39


Background ............................................................................................................................. 39
Convert a template .................................................................................................................. 39
Edit the template components ................................................................................................. 41
Edit template objects ............................................................................................................... 42
Edit graphical objects .............................................................................................................. 45
Edit text objects ....................................................................................................................... 45
Fit template components by the objects .................................................................................. 46
Convert assembly_bolt_list.tpl template .................................................................................. 46
Define the hierarchy of template objects ................................................................................. 47
Edit the visibility of the row ...................................................................................................... 48
Add new objects to the row ..................................................................................................... 48

TEKLA STRUCTURES TEMPLATE EDITOR


Contents

Preface

You will learn how to work with Template Editor and work with sample files. They may not
necessarily reflect other situations you may be working with. You will create a new textual
template from scratch. You will also create three graphical ones one by converting and
AutoCAD file into template objects, 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. We recommend you read the help file for more
detailed descriptions.

TEKLA STRUCTURES TEMPLATE EDITOR


Preface

Creating a New Template

1.1 Create a new template from scratch


Background
Templates are descriptions of forms and tables that can be included in Tekla Structures. The
forms can be graphical for inclusion in drawings as tables, text blocks, drawing headers, or
ASCII text form for 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 also run as a standalone
program.

Create a template
Your aim: In this section you will create a new template and define some basic properties.
Start by opening Template Editor in one of the following ways:

Start it in the Tekla Structures drawing editor by selecting Tools > Templates....

Start it in the Tekla Structures modeling editor by selecting Drawings & Reports >
Template Editor.

Click the corresponding icon Run template editor

First you will create a textual template in order to create a report, which will list bolts,
washers and nuts belonging to parts in an assembly.
Steps

1.

2.

You can create a new template in one of the following ways:

Click the New icon

Select File > New

Use the keyboard shortcut Ctrl + N.

Select Textual template as the template type.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

3.

Click OK. A new empty template is created.

1.2 Define template properties


Background
Template properties define the size, margins and column usage of the output template.

Edit template page properties


Your aim: In this section you will edit the properties of the template you just created.
Sometimes you may have to define these width and height preferences depending on the type
of template you are working with.

Steps

1.

Double-click in an empty area in the template window to open the Template Page
Properties dialog.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

2.

Set the Width to 80 characters and the Height to 40 characters.

3.

Set the View height to 30 characters.

4.

Click OK.

Read more about template page settings in TempEd Help: Template Editor >
Working with templates > Editing template properties > Edit page and
margin settings

Edit the graphical unit preferences


Your aim: In this section you will edit the graphical units that define the template. Change
the units to millimeters if you are using the metric environment of Tekla Structures. If you
are using the Imperial environment, then select your preferences to reflect that choice.
Steps

1.

Select Options > Preferences from drop-down menu.

2.

Set the graphical units to Millimeters.

3.

Click OK.

4.

Now save the template. Select File > Save as.

5.

Browse to the Template folder and save the template file with the name
Assembly_part_bolt_list.rpt. Youll continue working with the template in the following
sections.

Read more about preferences settings in TempEd Help: Template Editor > Menu Reference
> Options menu commands > Preferences

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

1.3 Insert template components and objects


Your aim: In this section you will insert template components, such as headers, and rows
and template objects, such as value fields and texts.

Background
The layout of a template is designed with template components. Template objects are then
placed inside template components to add either graphical or textual data. The properties of
components, objects and the template itself determine the final appearance.
Read more about template components in TempEd Help: Template Editor > Working with
template components.

Insert template components


Your aim: In this section you will add the following components header, page header, 5
rows, page footer and footer in order to form an assembly part bolt washer nut list.

Steps

1.

2.

Insert the template header and page header components by clicking the Header and
Page header icons on the Component toolbar.

Insert the row components. For each row, after clicking the Row icon in the
Component toolbar, select the Content type (assembly, part, bolt ) from the dropdown 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.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

3.

Insert the template page footer and footer components by clicking the Page footer and
Footer icons on the Component toolbar.

The components appear in the template work area and are listed in the Content Browser
on the left.

1.4 Edit the template components


Your aim: In this section you will work with template components and set a hierarchy for
template objects.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

Background
Setting a hierarchy is necessary for collecting the data from the model and it allows you to
set the base for controlling the way part information is displayed and output.
Read more about the hierarchy of template components in TempEd Help: Template Editor >
Working with template components > Working with rows > Use row hierarchy

Work with components


Your aim: In this section you will edit the template components you have just added
including naming the components and arranging the hierarchy of the components.
Steps

1.

Give a descriptive name for the rows - Steel_assembly, Part, Bolt, Washer, and Nut by selecting the row in the Content Browser and typing the name.

2.

Then, define the hierarchy for the rows according to the actual hierarchy in the model. In
the model, the bolts, washers and nuts are attached to parts, which in turn form an
assembly.

Select the Part row and click 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 the Shift row down a level button twice.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

This entire hierarchical structure is needed for collecting the data from the
model. For example, bolt data cannot be collected directly under an assembly
a part row is needed in between. Each row has a Hide in output option in
case you do not want the row contents to be visible in the final printout.

1.5 Insert objects into template components


Your aim: In this section you will insert template objects into the five different template
components.

Background
In textual templates you can only use text strings and value fields.
Read more about template objects in TempEd Help: Template Editor > Working with
template objects

Insert components into the header


Your aim: In this section you will insert text into the header.

Steps

1.

First, insert text into the header by selecting Insert > Text from the menu or by clicking
the Text icon.

Then type the text in the Enter text dialog.

2.

Click OK and place the text in the header.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

Insert value fields


Your aim: In this section you will insert a value field into the header and apply attributes to
the value field.
Read more about value fields in TempEd Help: Template Editor > Working with template
objects > Value fields.

Steps

1.

Put a value field next to the text by selecting Insert > Value Field from the menu or by
clicking the Value Field icon. Then place your cursor where you want to place the value
field.

After you have inserted the value field the Select Attribute dialog opens.

10

2.

Select the NAME attribute under the Project branch and click OK. Click the + boxes in
the tree structure to open the sub-rows.

3.

Double-click the value field to open the Value Field Properties dialog. Type a
descriptive name for the value field in the Name field.

4.

Add DATE and TIME value fields and corresponding texts to the right end of the header.
The objects also appear in the Content Browser.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

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 the field name inside the Content Browser.

5.

Select the DATE and TIME value fields and align them. Right-click the mouse and select
Align > Rights from the pop-up menu.

Insert objects into page header


Your aim: In this section you will insert multiple text fields into the template page header.
Use the steps described for inserting texts into the header to insert texts according to the
example below.

Insert objects into rows


Your aim: In this section you will insert template objects into rows.
In the previous sections you added texts and value fields and aligned them. You will
continue by inserting and aligning texts and value fields into the rows as shown below.
In the Value Field Properties dialog, click the Attribute button to open the Select
attribute dialog and then pick the attributes. Give descriptive names to the value fields that
appear in the Content Browser.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

11

Read more about attribute descriptions in Tekla Structures Help: System > Appendix D:
Template fields.

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 page footer


Your aim: In this section you will insert template objects into the page footer.
Using the steps from previous section, insert a text and a value field, both called "PAGE"
into the page footer according to the example below. Dont forget to align them to the right
side of the component.

Insert objects into footer


Your aim: In this section you will insert texts and value fields into the footer. You will also
define the value fields so that they will sum totals from the whole assembly.

12

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

Steps

1.

Insert texts into the footer according to the example below.

Between the texts, add a value field which counts the total number of assemblies. Copy
(Ctrl + C) the name of the value field you want counted from the Content Browser and
open the Value Field Properties dialog.

2.

Type the name for the value field and set the data type to Number.

3.

Click the Formula button to open the Formula Contents dialog.

4.

Select Total from the Value Field Function drop-down menu.

5.

Paste the name of the value field "NUMBER_of_assemblies" inside the quotation marks
(you can also select it from a list by clicking the Select button).

6.

Click the Check button to verify the syntax.

7.

Click OK in the Check dialog.

8.

Click OK in the Formula Contents dialog.

9.

Click OK in the Value Field Properties dialog.

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

13

1.6 Sorting value fields and rows


Your aim: In this section you will learn about sorting and how to apply it to rows and value
fields.

Background
When value fields are placed inside the template components, the next step is to define the
sorting of the value fields and rows. Sorting is done on three levels:

Inside the value field alpha-numerically ascending or descending (A to Z or Z to A).


Sorting the value field distinguishes all the different values of the field and a new row
will be written for 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.

The sort type of a row with the sorting type values Combine and Distinct, which
separate or combine identical row contents.
Read more about row sorting in TempEd Help: Template Editor > Working with
template components > Editing component properties > Edit sort type of row.

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 you 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 inside value fields


Your aim: In this section you will define the sorting order inside the value fields.

Steps

14

1.

Double-click the "Assembly_position" value field in the Content Browser or inside the
template component and set the order to "Ascending". The field values are sorted
alphabetically from A to Z, which can be seen in the Content Browser as an arrow.

2.

Repeat this for the following value fields in all rows:

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

"Part_position"

"Bolt_diameter"

"Bolt_standard"

"Bolt_length"

"Washer_diameter"

"Washer_standard"

"Nut_diameter"

"Nut_standard"

Define sort order between value fields


Your aim: In this section you will set the sorting between the value fields by giving the sort
order priority in the Content Browser.

Steps

1.

Select the Assembly_position value field in the Content Browser and click the Move
item up button. You can also drag and drop the value field into a new location.

The assemblies are sorted first by assembly position number, then by the amount of
assemblies.
2.

Repeat for all value fields in the following rows so that they appear like the example
below:

Define sort order between rows


Your aim: In this section you will edit the Row Properties dialog to define the sorting order
of rows. Note: The outcome of these changes only appears in the template output.
If all the rows have identical values in all value fields that are used in sorting, the rows are
called duplicate lines. If you want to output only one line instead of outputting a line for each
TEKLA STRUCTURES TEMPLATE EDITOR
Creating a New Template

15

duplicate object, set the sort type of the row to COMBINE. Then, for example, five instances
of assembly A/1 are listed only in one row instead of five rows.
Steps

1.

Double-click the "Steel_assembly" row in the Content Browser or the corresponding


component border to open the Row Properties dialog.

2.

Set the Sort type to Combine.

3.

Click OK.

4.

Repeat the above steps for all other rows.

Summing value fields


Your aim: In this section you will edit the properties of the Value Field properties dialog to
set the output options for value fields.
When the sort type of the row is set to Combine in the Row Properties dialog, the value
fields can be summed. There are three options for summing value fields:

Don't sum values gives the value of an individual field.

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.

Steps

To do this you need to define the summing for the number of assemblies.
1.

Double-click the "NUMBER_of_assemblies" value field to open the properties dialog.

2.

Set the summing option to Sum values across all rows.

3.

Click OK to close the dialog.

4.

Next, set the summing of the number of parts inside one assembly.
Because the part row is hierarchically under the assembly row in the Content Browser,
you must use the option Sum values within one row to get the number of identical parts
inside one assembly. (If the option Sum values across all rows was used, the number
of identical parts would be multiplied by the number of identical assemblies.)

5.

Define the summing of the number of bolts, washers and nuts using the Sum values
within one row option.

16

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

1.7 Edit the component properties


Background
A row rule is used if a row is should be output only under some special conditions.
Read more about rules in TempEd Help: Template Editor > Working with formulas and
rules.

Edit row rules


Your aim: In this section you will edit the rules of a row by using the Row Properties Rule
Wizard.
In this example template, you only want to list workshop bolts and leave site bolts out.
Therefore, you need a rule to separate them and only output the shop bolts.
Steps

1.

Double-click the Bolt row in the Content Browser or the corresponding component
border to open the Row Properties dialog.

2.

Click the Wizard button to open the Rule Wizard.

3.

First, select the attribute by clicking the None button, which opens the Select Attribute
or Value Field dialog.

4.

Select the attribute SITE_WORKSHOP.

5.

Click OK.

6.

Set the Condition to Equals.

7.

Set the Value to Workshop.

8.

Click OK in the Rule Wizard dialog.


TEKLA STRUCTURES TEMPLATE EDITOR
Creating a New Template

17

The rule is generated in the Rule box.

9.

Click OK in the Row Properties dialog.

10. Repeat the steps above for the Washer and Nut rows.

Read more about the Rule Wizard in TempEd Help: Template Editor > Working with
formulas and rules > Row rules > Rule Wizard dialog.

Edit the height of the template component


Your aim: You will adjust the height of a template row.
Edit the template component heights to fit the contents by selecting the component handle in
the middle and dragging them.

The final template rows should look like this:

18

TEKLA STRUCTURES TEMPLATE EDITOR


Creating a New Template

Converting an Existing
File into a Template

2.1 Convert an AutoCAD File into a Template


Your aim: In this section you will import an AutoCAD file, edit groups of template objects
and define fonts and value fields in your template.

Background
You can use AutoCAD (DXF or DWG AutoCAD 2000 and older) files and MicroStation
(DGN MicroStation DGN 7) files in graphical templates. Template Editor imports the files
and converts their contents to a group of drawing objects. If you have designed a template
with AutoCAD you can use free attributes in AutoCAD to mark value fields. Template
Editor automatically converts them to value field objects as the file is imported.
Read more about warnings in TempEd Help: Template Editor > Working with template
objects > AutoCAD and MicroStation files > limitations in AutoCAD and MicroStation file
imports.

Create a new template with components


Your aim: In this section you will create a new template and work with a row in preparation
to insert an AutoCAD file.
Steps

1.

Create a new graphical template in one of the following ways:

click the New icon

select File > New

use the keyboard shortcut Ctrl + N.

2.

Set the template type to Graphical template.

3.

Click OK. A new template is created.

4.

Next, insert a row by clicking the Row button on the Component toolbar.

5.

Set the content type to "DRAWING", because you will insert a drawing title block.
The available attributes depend on the content type. If the file being imported
has attribute fields, it is essential to set the content type of the row so that the
corresponding attributes are available in the template.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

19

6.

Open the Row Properties dialog and give a descriptive name for the row.

7.

Set the row height to 100 mm.

8.

Click OK.

Insert the AutoCAD file and edit its contents


Your aim: In this section you will insert an AutoCAD file into the template and edit the
contents to suit your needs.
Now you can insert the AutoCAD file inside the row.
Steps

1.

Select Insert > File.

2.

Pick the file you want to insert.

3.

Double-click where you want to position the lower left corner of the title block.

Template Editor opens a dialog where you can define the size and scale definition.

4.

Select the Scale radio button and set the scale to 1. The AutoCAD block is scaled to 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.

20

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

and it appears as a group in the Content Browser.

Ungrouping and regrouping template objects


Your aim: In this section you will edit the contents of the AutoCAD block by ungrouping
and then regrouping selected objects.
In order to edit the contents of the inserted block, you need to ungroup it first by selecting the
group. Then right-click the mouse and select Ungroup.
Read more about groups in TempEd Help: Template Editor > Working with template objects
> Editing template objects > Group or ungroup objects.
You can now edit the individual objects inside the block and they are visible in the Content
Browser.

Objects, such as lines, are now separate and in some cases we suggest you regroup them.
Next, you will form a group out of the lines that form the company logo.
Steps

1.

Zoom in to the logo with the middle mouse scrolling button.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

21

2.

Using area select, select all the lines that form the logo.

3.

Right-click the mouse and select Group. A group is created.

You can resize the group by dragging the corner handles. Group properties,
such as color, can be edited in the Group Properties dialog (select the group,
right-click the mouse and select Properties).

Define fonts for the texts


Your aim: In this section you will define the font properties for text objects in the template.
The fonts used in text objects are mapped to Tekla fonts. This may slightly distort the font
alignment within the text object as the original font geometry is not available in Template
Editor. You need to edit the text properties.
Steps

22

1.
2.
3.
4.
5.
6.
7.
8.

Select the text you want to edit.


Right-click the mouse and select Properties.
Click the Font button.
Select either a TrueType font or a Tekla font on the list.
Select the font size.
Select Ratio (h/w) in the Effects section and change it to "0.6".
Click OK in the Select Font dialog.
Click OK in the Text Properties dialog.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

Define value fields in an AutoCAD file


Your aim: In this section you will edit the value fields of the AutoCAD file you imported.
Steps

1.

The attribute fields in the AutoCAD file have been converted into value fields, but the
attributes need to be defined.
You need to go through all value fields and set the attributes in the Formula field of the
Value Field Properties dialog. Use the attribute list that opens when you click the
Attribute button.
Read more about attribute descriptions in Tekla Structures Help: System > Appendix D:
Template fields.

2.

Open the Value Field Properties dialog by double-clicking the "PROJECTNO" value
field in the Content Browser or in the work area. A missing attribute warning is
displayed, but you can ignore it and close it by clicking the OK button.

3.

Click the Attribute button to open the Select attribute dialog.

4.

Select the corresponding attribute from the list and click OK.

5.

Load the default settings for the attribute by clicking Yes.

6.

Click OK to close the dialog.

7.

Repeat the above steps for the rest of the value fields.

8.

Save the template.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

23

2.2 Work with multiple templates


Your aim: In this section you will separate the revision lines from the drawing title and
create a new template for them. You will work with multiple templates.

Background
In Template Editor you can open several templates simultaneously. 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.
Read more about working with multiple templates in TempEd Help: Template Editor >
Working with templates > Creating, opening & saving templates > Work with multiple
templates.

Break the template into two separate templates


Your aim: In this section you will break down the components of one template and cut and
paste it into a newly created template.
Steps

1.

Use an area select to select the objects lines and value fields which you want to cut
from the drawing title template (deselect the row by holding down the Ctrl key and
picking the border).

2.
3.

Cut the objects using Ctrl + X or right-click the mouse and select Cut.
Create a new graphical template using Ctrl + N and setting Graphical template as the
template type.
Insert a row.
Set the content type of the row to REVISION.
Because the area needed for pasting must be large enough, you need to edit the template
page width. Double-click an empty area in the template to open the Page Properties
dialog and set the width to 215 mm.

4.
5.
6.

7.

Paste the objects inside the row using Ctrl + V or right-click the mouse and select Paste.

The value fields and drawing lines are inserted into the new template. Now, save both
templates.

24

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

Edit the new template


Your aim: In this section you will now edit the new template you just created. You will
create a header, a footer and move the texts and the some of the lines into them leaving only
the value fields in the row.
Steps

1.

Create a header by clicking the Header icon.

2.

Create a footer by clicking the Footer icon.

3.

Select the lines that form the upper row above the value fields.

4.

Cut and paste them into the header.

5.

Select the texts and the lines that form the lower row below the value fields.

6.

Cut and paste them into the footer.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

25

7.

Select the row and resize the template components to fit the objects inside them using
Edit > Crop > Template right side and Edit > Crop > Component height.

8.

Save the template.

2.3 Create a "bill of materials" template


Your aim: In this section you will use the same steps for inserting an AutoCAD file in order
to create a bill of materials template to be used in multi-drawings.

Background
If you recall in section 1.8, you imported an AutoCAD file and edited the contents. You will
go through some very similar steps in this section.

Create a new template


Steps

26

1.

Create a new graphical template in one of the following ways:

click the New icon

select File > New

use the keyboard shortcut Ctrl + N.

2.

Set the template type to Graphical template.

3.

Click OK. A new template is created.

4.

Next, insert a row by clicking the Row button on the Component toolbar.

5.

Set the content type of the row to "ASSEMBLY", because you will insert an assemblyrelated file block.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

6.

Check the dimensions of the AutoCAD block and edit the template page properties
accordingly. Double-click an empty space to open the Page Properties dialog.
It is essential to have the same dimensions in the template and in the
AutoCAD file in order for the scale to remain the same.

Insert the AutoCAD file


Your aim: You will insert the AutoCAD file in the row you created in the previous section.
Steps

1.

Select Insert > File from the menu.

2.

Pick the file you want to insert.

3.

Double-click to position the file in the lower left corner of the block. Set the scale to 1:1.
A group of objects is inserted inside the row borders.

Design the template contents and break the block


Your aim: In this section you will examine the file contents and then design the contents of
your template.
Before you get started, some questions to ask regarding your needs:

What template components do you need? A header, some rows

What content types do you need for the rows? Assembly, part, bolt

Do you need hierarchy between the components? Assembly part bolt relations

What kinds of objects do you need? Value fields what attributes should you use?

How do you divide the contents of the block? What object goes where?
TEKLA STRUCTURES TEMPLATE EDITOR
Converting an Existing File into a Template

27

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.
Take note of the hierarchical structure of the objects in the model and how it
affects the template.
Steps

Next you will create template components and define content types.
1.

Insert the needed template components:

2.

28

the header, which will have the labels


rows for assembly, part and bolt data
some rows for empty space.

Click the Header and Row button on the Component toolbar and define the content
types for the rows:
Assembly
Part
Bolt
leave the content type of the two empty rows undefined.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

Because you want to list all parts under the assemblies which they form, you need to set
an assemblypart hierarchy for the rows. Bolts will be listed separately, so no hierarchy
is required.
3.

In the Content Browser, select the part row and shift it down a level under the assembly
row using the Shift row down a level button.

Divide AutoCAD block contents into template components


Your aim: In this section you will start putting template objects into the components. Start
by ungrouping the AutoCAD block you worked with in previous sections.
Steps

1.

Select the block.

2.

Right-click the mouse and select Ungroup.


Cut the objects from the block and paste them into the components that you created.

3.

Select the texts and lines that will go in the header and cut and paste them.

4.

Then cut and paste the texts and lines which belong to the assembly row.

5.

Continue with part row objects.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

29

6.

Then move the bolt "header" information into the empty content type row.

7.

Followed by the bolt row contents.

8.

And finally contents of one single, empty row just the lines, without any texts.

9.

Then copy and paste the last empty row with the contents into the template and shift the
new row up under the Assembly row using the Move item up button in the Content
Browser.

You now have all the needed template components and more, so you can clean the
template by deleting the first row with the remains of the block, which are no longer
needed.
10. Select the components and resize them to fit the objects inside them using Edit > Crop
> Template right side and Edit > Crop > Component height.

30

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

Insert value fields


Your aim: In this section you will add value fields to define the gathering of information
from the Tekla Structures model.
When the template components are filled with the correct objects from the AutoCAD block,
you will replace the texts inside the rows with value fields, which will collect data from the
Tekla Structures model automatically. 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.
Steps

1.

Start with the assembly row. Select the number under QTY and delete it.

2.

Insert a value field in the Assembly row. A list of assembly-related attributes opens in a
separate dialog.

3.

Select the NUMBER attribute.

4.

Continue with the "Ship mark" by deleting the text and inserting a value field with the
ASSEMBLY_POS attribute.

5.

Complete the row by replacing the texts with the corresponding value fields.

6.

Next you should insert value fields in the part and bolt rows using the same steps from
2-5.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

31

Set rules for rows using the Rule Wizard


Your aim: In this section you will define rules for the rows using the Rule Wizard.
After objects are in place, you can define the rules for rows. Next you will use the Rule
Wizard for creating an "ifthenelse" statement for the bolt title row to place the row as the
23rd row of the page.
Steps

1.

Open the Row Properties dialog of the row with the bolt title information.

2.

Click the Wizard button.

3.

Click the None button under the attributes.

4.

Select the ROW_IN_PAGE attribute from the list. The attribute name appears in the
button.

5.

Then set the value so that it is equal to "23".

6.

Click OK. The rule is generated automatically:


if (GetValue("ROW_IN_PAGE") == "23") then
Output()
else
StepOver()
endif

7.

32

Close the dialog by clicking OK and save the template.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting an Existing File into a Template

Other Ways to Utilize


Templates

3.1 Using bitmaps in templates


Your aim: In this section you will edit an existing graphical template and replace a bitmap
with a new one.

Background
New functionalities in Tekla Structures 15 mean you can work with different raster files.
Company logos, for example, are easier to work with and you no longer require special fonts
when working with them. The supported formats include: .bmp, .jpg, .jpeg, .tif, .tiff, and
.png.

Edit the template and insert a new bitmap


Your aim: In this section you will insert a new bitmap into a template.
Steps

1.

In Tekla Structures double-click on the template on the drawing you are working on to
open it in Template Editor.
The template opens in Template Editor.

2.

Click on the bitmap you want to delete, right-click the mouse and click Cut. The bitmap
is deleted.

3.

Select Insert > Picture from the menu. The Select Picture File dialog opens,
prompting you to choose the directory and picture file you want to insert in the template
component.

4.

Click OK.
A pointer appears where you can define the lower lefthand corner of the bitmap.
Double-click to insert the picture.
You can drag the handles to resize the bitmap.
Be aware that loading times will increase if you insert very large bitmap files.
To keep the aspect ratio of the bitmap intact, double-click the bitmap to open
the Picture Properties dialog and check Keep aspect ratio.

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

33

Define the location of bitmaps in Options > Preferences> File locations


under Symbols, Pictures field. Separate different folders with a semicolon.
Note that the same file location MUST be defined to Tekla Structures
DXK_SYMBOLPATH environment variable.

3.2 Using templates in customized Tekla Structures


part marks
Your aim: In this section you will create a new template for showing custom part marks in
Tekla Structures.

Background
New functionalities in Tekla Structures 15 mean you can create and edit Tekla Structures
part marks with Template Editor. You can create custom graphical templates (.tpl) and add
them as elements in marks and associative notes in the same way as other elements. The
template marks may include, for example, detailed information about the submaterial
included in an embed or assembly. You can also add graphical objects using Template Editor
tools in your mark templates. You can add templates in any marks and associative notes in
single-part, assembly, cast unit and general arrangement drawings.
You can now create Cast unit B.O.M. style marks or create complex templates to report sub
material, for example, show assembly mark with bolts, holes, rebar or studs for column base
plate all as one mark. All graphical template objects except bitmaps are supported.
You may have to edit Tekla Structures environmental variables to set the preferences to your
needs. For example you have to set the mark template folder using the variable
XS_TEMPLATE_MARK_SUB_DIRECTORY. Name the template mark sub-directory
mark. Create the directory and place the mark templates into it.

Create a new template for part marks


Your aim: In this section you will create a new template and add components and objects for
part mark information from the database.
Steps

34

1.

Create a new graphical template in one of the following ways:

click the New icon

select File > New

use the keyboard shortcut Ctrl + N.

In Tekla Structures, open the part mark properties dialog, select Template from the
available elements list, then click the Create new template button.

2.

Set the template type to Graphical template.

3.

Click OK. A new template is created.

4.

Next, insert a row by clicking the Row button on the Component toolbar.

5.

Set the content type of the row to "ASSEMBLY", because you will insert an assemblyrelated file block.

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

6.

Insert three more rows and set the content types of those rows to PART,REBAR
and STUD.

7.

Use the Sorting and Drawing Order toolbar to set the hierarchy of the rows by shifting
the PART row down one LEVEL and REBAR and STUD rows down two levels.

8.

In the ASSEMBLY row insert a value field and name it MAINPART.NAME_field


Set the formula to GetValue("MAINPART.NAME") in the Value Field Properties
dialog.

9.

In the PART row insert and set the following:

One text field with the text L=

Two value fields:


o

A field named PROFILE_field, with the formula GetValue("PROFILE")

A field named LENGTH, with the formula GetValue("LENGTH")

10. In the REBAR row insert and set the following:

Two text fields


o

A field with the text Rebar

A field with the text L=

Three value fields


o

A unnamed field, with the formula GetValue("SIZE")

A unnamed field, with the formula GetValue("LENGTH")

A field named GRADE_field, with the formula GetValue("GRADE")

11. In the STUD row insert and set the following:

Three text fields


o

A field with the text Studs

A field with the text pcs

A field with the text x

Four value fields


o

A
field
named
GetValue("NUMBER")

NUMBER_field,

with

A
field
named
DIAMETER_field,
GetValue("DIAMETER")

A unnamed field, with the formula GetValue("LENGTH")

A unnamed field, with the formula GetValue("GRADE")

with

the

formula

the

formula

12. You need to rearrange the objects so that they look like this in the template:

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

35

Here is an example of a Tekla Structures part mark that has been created with Template
Editor:

3.3 Modifying tooltips in Web Viewer


Your aim: In this section you will edit an existing template that has been created for
showing tooltips in the Web Viewer.

Background
New functionalities in Tekla Structures 15 mean you can create and edit Tekla Structures
tooltips with Template Editor.
Previously, the tooltips always contained the same fixed information. The available tooltip
templates are shown in the new Tooltip in Web Viewer list in the Publish as Web Page
dialog.
In addition to pre-defined templates, you can add new templates which better suit your
needs, showing, for example, tooltips on assembly marks, weight, dimensions and profiles.
Use the Template Editor to define the templates.
Tooltip templates are report (.rpt) templates.

Open and edit a tooltip template


Your aim: In this section you will open and edit an existing tooltips template.
Steps

36

1.

Navigate to the folder where the web viewer tooltips templates are saved:
TeklaStructures\15.0\environments\<your environment>\template\tooltips

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

2.

Double-click on the .rpt file you want to open.


Template Editor opens.
In this example the template is incomplete, with a row containing information on
assembly length information missing. We will add a row, a text field and define a value
field in the row.

3.

We need to add an assembly row here.

4.

Insert a row by clicking the icon in the toolbar.

5.

Rename the row ASSEMBLY_1 and move it up under the ASSEMBLY row by clicking
the Up button on the Sort and Drawing Order toolbar.

6.

Click on the Text icon in the object toolbar. The Enter Text dialog opens, so type in
Assembly length (mm): and then using the mouse pointer insert the text field into the
row on the left side.

7.

Next you will insert a value field for gathering length values.

8.

Click on the Value field icon in the object toolbar.

9.

Click to place the value field in the ASSEMBLY_1 row. You will position it to the right
of the Assembly length (mm): text field you just inserted. When you click the Select
Attribute dialog opens asking you define the attribute for the value field.

10. Select LENGTH and click OK. The value field is inserted in the row. Template Editor
applies the formula GetValue("LENGTH") based on the defined environment variable.

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

37

If you need to redefine the formula for the value field, double-click it to open
the Value Field Properties dialog and edit the formula for your needs.

11. Now save the template using the keyboard shortcut Ctrl + S. Save the report in the same
folder you used earlier \environments\<your_environment>\template\tooltips. You
also need to add the new report information to the file WebViewerTooltips.ini, which is
located in the same folder

View the tooltip


Your aim: In this section you will check the results of the changes you just made to the
template in the previous section.
Steps

To view the tooltip in Web Viewer you need to refer to your open model in Tekla Structures.
1.

Click on the part you want to publish as a web page and select File > Publish as Web
Page in the Tekla Structures menu.

38

2.

In the Publish as Web Page dialog, select the name of the template you saved in the
previous section in the Tooltip in Web Viewer section of the dialog.

3.

Click Publish.

4.

When you refer back to the model you can see the text field and value field you added to
the template in the previous section.

TEKLA STRUCTURES TEMPLATE EDITOR


Other Ways to Utilize Templates

Converting Templates

4.1 Convert old templates to new format


IF YOU ARE USING TEKLA STRUCTURES 15, YOU CAN DISREGARD THIS
SECTION.
Your aim: In this section you will convert template files created with older versions of
Template Editor to a new format.

Background
When you open an old template file, Template Editor automatically converts it to the new
format. Once the template has been converted you may have to do some editing: define the
hierarchy, rules and sorting of the rows and fields.
Read more about template conversion in TempEd Help: Template Editor > Template
Conversion.
Note: From Tekla Structures 15.0 and onwards, the use of old templates will

no longer be supported! So if you convert old templates to a new format you


will not be able to compare the results. In this case you will need to use an
older version of Tekla Structures (e.g. Tekla Structures 14.1) to compare
conversion results.

Convert a template
Your aim: In this section you will convert a graphical template called
assembly_part_list.tpl.
TEKLA STRUCTURES TEMPLATE EDITOR
Converting Templates

39

Steps

1.

Start by opening the file you want to convert. Select File > Open or click the
corresponding icon.

2.

Select the file assembly_part_list.tpl from the file selection dialog. It should be located
in the Template folder of your environment folder in 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.

4.

Define the conversion options.

Always back-up the original file for later usage.

5.

Click OK. The converted template opens with a warning 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.

40

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

Edit the template components


Your aim: In this section you will edit template components after they have been converted
to the new format.
Steps

1.

Rename the template components using descriptive names. See previous section for the
naming procedure.

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.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

41

3.

Edit the row 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 the Advanced button.

4.

Select the rule and delete it.

5.

Click OK in the Rule Wizard dialog.

6.

Click OK in the Row Properties dialog.

Edit template objects


Your aim: In this section you will edit value fields and value field properties after they have
been converted to the new format.
Background

Check all value field contents because some of the attribute names are different from those in
Template Editor version 2.2. The formula structure has changed as well.
Read more about attribute names in TempEd Help: Template Editor > Template conversion
> Troubleshooting conversion > Mapping attribute names and properties in template
conversion.

Steps

42

1.

Open the Value Field Properties dialog for each value field and check the attribute
name. A warning is displayed if the attribute is unknown.

2.

Open the list of attributes by clicking the Attribute button.

3.

Select the correct attribute from the list and click OK.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

4.

We recommend that you 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:

6.

Check the alphabetical sorting of the value fields in the Content Browser and
change the ascending / descending values if needed.

Check 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.

Check whether similar rows also should be displayed.

Rename the value fields to more descriptive ones. After conversion, the names appear
in the format field_ATTRIBUTE_NAME. Keep in mind that the value field names must
be unique.

You can rename the objects directly in the Content Browser, without opening
the properties dialog.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

43

7.

Align the value fields with text objects. First, select the objects and then right-click the
mouse and select Align > Lefts.

8.

Go through the summing value fields in the footer. Change the formulas so they have
the correct value field names inside the brackets and quotation marks. See the previous
section for more information.

9.

Next, change the color of the value fields. Select all the value fields at the same time by
holding down the Shift key.

10. Right-click the mouse and select Properties .


11. Click the Font button.
12. Change the color to red.

44

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

13. Click OK in the Select Font dialog.


14. Click OK in the Value Field Properties dialog.

Edit graphical objects


Your aim: In this section you will proceed with the template by editing the colors of all
border lines in the template.
Steps

1.

Select all lines at the same time by holding down the Shift key.

2.

Right-click the mouse and select Properties .

3.

Change the color to yellow.

4.

Click OK.

Edit text objects


Your aim: In this section you will proceed with the template by editing the colors of all text
strings.
Steps

1.

Select all text strings of the same font size by picking them while holding down the Shift
key.

2.

Right-click the mouse and select Properties .

3.

Click the Font button.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

45

4.

Change the color to green.

5.

Click OK in the Select Font dialog.

6.

Click OK in the Text Properties dialog.

Fit template components by the objects


Your aim: In this section you will crop the template components so that the contents are
fitted to the template.
The right side of template components can be fitted by the contents. Select Edit > Crop >
Template Right Side. Empty space is cut from the right side.
The finalized template should now look like the example below:

Convert assembly_bolt_list.tpl template


Your aim: In this section you will
The second example of file conversion has an additional hierarchy definition for a missing
object branch.
Steps

46

1.

To start the conversion process all over again, click the Open icon

2.

and select the file to be converted: this time the file assembly_bolt_list.tpl.

3.

Define the conversion options and

4.

edit the template components and objects like in the previous example. Do not edit the
hierarchy yet, you will do that next.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

Define the hierarchy of template objects


Your aim: In this section you will edit the hierarchy of the objects in the template.
The entire 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.
Steps

1.

In the components toolbar select Row.

2.

Set the content type of the row to "PART".


A new row is created.

3.

Double-click the new row in the Content Browser to open the Row Properties dialog.

4.

Enter a descriptive name for the row in the Content Browser, for example, Part.

5.

Move the row up between the Assembly and Bolt rows by selecting the row and clicking
the Move item up button.

6.

Shift the Part row down a level under the Assembly row by clicking the Shift row down
a level button.

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

47

7.

Select the Bolt row and shift it under the part row by clicking the Shift row down a
level button twice.

Edit the visibility of the row


Your aim: In this section you will hide the Part row in the final output.
Steps

1.

Open the Row Properties dialog for the Part row.

2.

Click 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.

Add new objects to the row


Your aim: In this section you will add objects to the row and finalize your work on the
template.
The empty Part row needs some contents.
In order to have all different parts listed, add a value field PART_POS, with ascending
sorting to the row.
It will not be visible, because the row has the option Hide in output checked.
The final template should look like this:

The hidden objects (row and value field) are displayed as dashed lines.

48

TEKLA STRUCTURES TEMPLATE EDITOR


Converting Templates

APPENDIX I

Hierarchy of objects in a cast unit in a Tekla Structures model

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
TEKLA STRUCTURES TEMPLATE EDITOR
Converting Templates

49

Вам также может понравиться