Академический Документы
Профессиональный Документы
Культура Документы
Template Editor
Training Manual
Product version 15.0
March 31, 2009
Copyright 2009 Tekla corporation
Contents
Contents.................................................................................................................................. i
Preface ................................................................................................................................... 1
1
1.3
1.4
1.5
1.6
1.7
2.2
2.3
ii
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.
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.
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.
3.
Steps
1.
Double-click in an empty area in the template window to open the Template Page
Properties dialog.
2.
3.
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
1.
2.
3.
Click OK.
4.
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
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.
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.
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.
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
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.
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.
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
Steps
1.
First, insert text into the header by selecting Insert > Text from the menu or by clicking
the Text icon.
2.
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.
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.
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.
12
Steps
1.
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.
4.
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.
7.
8.
9.
13
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:
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
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.
"Part_position"
"Bolt_diameter"
"Bolt_standard"
"Bolt_length"
"Washer_diameter"
"Washer_standard"
"Nut_diameter"
"Nut_standard"
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:
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.
2.
3.
Click OK.
4.
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.
2.
3.
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
1.
Double-click the Bolt row in the Content Browser or the corresponding component
border to open the Row Properties dialog.
2.
3.
First, select the attribute by clicking the None button, which opens the Select Attribute
or Value Field dialog.
4.
5.
Click OK.
6.
7.
8.
17
9.
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.
18
Converting an Existing
File into a 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.
1.
2.
3.
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.
19
6.
Open the Row Properties dialog and give a descriptive name for the row.
7.
8.
Click OK.
1.
2.
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
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.
21
2.
Using area select, select all the lines that form the logo.
3.
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).
22
1.
2.
3.
4.
5.
6.
7.
8.
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.
4.
Select the corresponding attribute from the list and click OK.
5.
6.
7.
Repeat the above steps for the rest of the value fields.
8.
23
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.
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
1.
2.
3.
Select the lines that form the upper row above the value fields.
4.
5.
Select the texts and the lines that form the lower row below the value fields.
6.
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.
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.
26
1.
2.
3.
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.
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.
1.
2.
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.
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.
2.
28
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.
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.
1.
2.
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.
29
6.
Then move the bolt "header" information into the empty content type row.
7.
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
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.
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.
31
1.
Open the Row Properties dialog of the row with the bolt title information.
2.
3.
4.
Select the ROW_IN_PAGE attribute from the list. The attribute name appears in the
button.
5.
6.
7.
32
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.
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.
33
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.
34
1.
In Tekla Structures, open the part mark properties dialog, select Template from the
available elements list, then click the Create new template button.
2.
3.
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.
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.
9.
A
field
named
GetValue("NUMBER")
NUMBER_field,
with
A
field
named
DIAMETER_field,
GetValue("DIAMETER")
with
the
formula
the
formula
12. You need to rearrange the objects so that they look like this in the template:
35
Here is an example of a Tekla Structures part mark that has been created with Template
Editor:
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.
36
1.
Navigate to the folder where the web viewer tooltips templates are saved:
TeklaStructures\15.0\environments\<your environment>\template\tooltips
2.
3.
4.
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.
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.
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
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.
Converting Templates
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
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.
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
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.
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.
5.
6.
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.
3.
Select the correct attribute from the list and click OK.
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.
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.
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.
44
1.
Select all lines at the same time by holding down the Shift key.
2.
3.
4.
Click OK.
1.
Select all text strings of the same font size by picking them while holding down the Shift
key.
2.
3.
45
4.
5.
6.
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.
4.
edit the template components and objects like in the previous example. Do not edit the
hierarchy yet, you will do that next.
1.
2.
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.
47
7.
Select the Bolt row and shift it under the part row by clicking the Shift row down a
level button twice.
1.
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.
The hidden objects (row and value field) are displayed as dashed lines.
48
APPENDIX I
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