Académique Documents
Professionnel Documents
Culture Documents
Table of contents
1
Table of contents
2
Table of contents
4.3.4 Move................................................................................. 34
4.3.5 Clear ................................................................................. 35
4.3.6 Undo ................................................................................. 35
4.3.7 Redo ................................................................................. 35
4.4 Properties menu .............................................................................. 35
4.5 Window menu.................................................................................. 35
4.5.1 Zoom ................................................................................ 35
4.5.2 Redraw ............................................................................. 36
4.5.3 Create zoom ..................................................................... 36
4.5.4 Magnifier........................................................................... 36
4.5.5 Delete zoom ..................................................................... 36
4.6 Settings menu.................................................................................. 36
4.6.1 Line style... ....................................................................... 36
4.6.2 Font... ............................................................................... 36
4.6.3 Grid... ................................................................................ 37
4.6.4 Template........................................................................... 37
4.6.5 Page... .............................................................................. 39
4.7 Options menu .................................................................................. 40
4.7.1 Automatic redrawing ......................................................... 40
4.7.2 Continuous action ............................................................. 40
4.7.3 Partial window picking ...................................................... 40
4.7.4 Multiple picking ................................................................. 40
5 Examples.................................................................................................. 41
5.1 Graphic template ............................................................................. 41
5.2 Report template ............................................................................... 42
3
Table of contents
4
1 Using This Manual
We also recommend that you consult the reference manuals for the
application in which you will use the templates.
5
1 Using This Manual
6
2 About Templates
2 About Templates
What are templates?
Header
Page header
7
2 About Templates
Row
Intermediate row
Page footer
A page footer is output at the end of the page (see Page header
above) and each template can contain several page footers.
Footer
Table parts are defined by drawing table part frames around the
objects to be included in the required table part. Table parts are not
drawn in WYSIWYG (what you see is what you get) form. The refer-
ence point for horizontal and vertical positioning of table parts is cal-
culated by the extremities of the contained objects, not by the table
part frames. The positioning can be controlled with the margin prop-
erties and the output of rows and intermediate rows can be controlled
with rules (See the section titled “Rules” on page 9).
8
2 About Templates
Every table part may include all the types listed above. For example,
Row may include graphic objects, which will be output with every line.
2.4 Rules
Rules are used to control the output of rows and intermediate rows. A
rule is always one expression.
9
2 About Templates
2.4.1 Syntax
The lexical elements and expression syntax used in rules are the
same as those used in C-language.
• || or
• && and
• == equal to
• != not equal to
• < less
• <= less or equal
• > greater
• >= greater or equal
• + addition operator
• - subtraction operator
• * multiple operator
• / divide operator
10
2 About Templates
2.4.2 Functions
In the rules, you can use functions to ask the values of any field
defined in the application, regardless of whether the field is displayed
in the row or not.
curr("attribute")
returns the attribute of the line that has just been output
next("attribute")
first()
last()
do()
pass()
forw()
11
2 About Templates
or :
if (curr("BOLT_SITE_WORKSHOP") == "Site") then
forw()
else
do()
endif
12
3 User Interface
3 User Interface
3.1 Screen Layout
After starting Template Editor a new window appears on the screen.
The following illustration identifies the parts of the Template Editor
screen.
You will find the menu bar at the top of the menu window. Choose a
function by positioning the mouse pointer on an option and clicking
the left mouse button. A pull-down menu will appear. While still hold-
ing down the mouse button, drag the pointer down the menu. As the
pointer moves, it highlights the button for each available sub-option.
Choose one of the sub-options by releasing the mouse button.
3.1.2 Icons
The icons are used for fast menu selection. By clicking on an icon the
appropriate function will be started. The icon menu gives you an
alternative to selecting from the pull-down menu.
13
3 User Interface
3.2.1.1 Controls
All Template Editor dialog boxes have similar controls, either check
boxes or buttons. The buttons are usually situated at the lower edge
of the dialog box and have the same meaning in all dialog boxes
This applies the current dialog box properties to the default values
and closes the dialog box. New objects will be created according to
these default values.
14
3 User Interface
This applies the dialog box properties to the default values without
closing the dialog box.
This closes the dialog box without applying the dialog box properties
to the default values.
This modifies the selected object(s) according to the properties
defined in the dialog box, but does not apply any values. Modified
properties are filtered with the check boxes positioned to the left of
the corresponding dialog box fields. When a check box is ticked the
corresponding value will be changed.
To point to an item on screen, move the mouse until the tip of the
pointer is over the item or area you want to point to. Then, do one of
the following actions.
• Clicking means that you press and release the mouse button once,
while keeping the mouse pointer in the same place.
• Dragging is used to move an item to another location. First, point to the
item, then press and hold down the mouse button. While still pressing
the mouse button, move the pointer to another location, dragging the
selected item with it; then release the button.
3.3.1 Selecting
The left mouse button is reserved for selecting objects (symbols and
primitives). Use a single click to select an object and a drag to select
the objects inside a rectangular area. Extend a selection by pressing
15
3 User Interface
the Shift key while making the selection. To toggle the selection sta-
tus of an object, press the Control key while making the selection.
After using the left mouse button to select an object, you can move it
around by dragging it with either the middle or the left mouse button.
If you use the left button you must start the dragging from a selected
object to avoid making a new area selection.
First, select a primitive that you want to resize. Next, start to resize it
by moving the cursor over one of the handles which will have become
visible at the edge of the selected object. Drag the handle to the
desired position. When more than one object has been selected, only
the one which was dragged by a handle will be resized; the others will
only be moved.
You can only apply this operation to primitives. Select the primitives
you want to rotate, then start rotation by pressing Control and drag-
ging with the middle mouse button. If you start with the pointer on a
selected primitive you can also use the left mouse button.
16
4 Menu Functions
4 Menu Functions
4.1 File menu
Functions in the File menu are used for opening and saving the
graphic and report templates.
This function opens a file selection box that lets you open an existing
graphic template. Only one template can be open at the same time.
Graphic templates are saved with the .tpl extension.
This function opens a file selection box that lets you open an existing
report template. Only one template can be open at a time. Report
templates are saved with the .rpt extension.
This function opens a file selection box for naming and creating new
graphic templates.
This function opens a file selection box for naming and creating new
report templates.
17
4 Menu Functions
4.1.5 Save
This function saves the currently open template under its existing
name. Accordingly, Template Editor checks that all the objects are
inside table part frames. If this is not the case, Template Editor will
give you the following warning.
Any objects located outside table parts are not handled when the
application uses templates.
NOTE: Using templates that have been saved with this warning may
cause unexpected results.
4.1.6 Save as
This function saves the currently open template with a new name.
Accordingly, Template Editor checks that all the objects are inside
table part frames. Template Editor also makes the new template into
the current template.
Use this function to read DXF files into templates. In this case, only
lines and texts will be read and texts will be converted to use Tem-
plate Editor fonts. This function opens the Import dxf File dialog box
that you will use to select files.
18
4 Menu Functions
4.1.8 Exit
The Exit function stops the Template Editor without saving the cur-
rently open template. Before stopping the program you will see the
following confirmation dialog box.
19
4 Menu Functions
Template component
The combo box defines the type of template component. For the dif-
ferent template components, see the section titled “Table parts” on
page 7.
This field defines the plot order and output of intermediate rows. The
numbering is expected to be unique. When a template includes sev-
eral intermediate rows, summary rows order is used to define which
row will be plotted first.
20
4 Menu Functions
Print on
This field lets you specify where page headers and footers will be
printed. You can use this function to specify whether headers and
footers will appear on odd pages only, even pages only, or on all
pages.
Line styles
Click this button to open a dialog box for defining the color and other
properties of the line used to draw the Template Editor frame.
Apply to
Radio buttons let you define whether the line style is individually
defined for the selected object or whether it is defined in the library.
Modifying an individual line style will only affect an selected object.
Modifying a library line style (see the section titled “.Line style...” on
21
4 Menu Functions
page 33) will automatically change all objects that share this line
style.
This function lets you view a list of line styles in a template’s line style
library.
Color
Type
Width
NOTE: Line color, type and width may be applied differently depending on
the application that is using the templates. For example, this can occur with
line thickness on a plotted drawing if the application only uses color for man-
aging the line thickness.
Fill color
This function lets you select the fill color (only affecting filled areas).
Fill type
This function lets you select the fill type (only affecting filled areas).
Rule...
This rule controls the output of rows and intermediate rows. Selecting
this function opens the Tablepart Condition dialog box so you can
enter the required rule.
22
4 Menu Functions
For more information about rules, see the section titled “Rules” on
page 9.
To create a text field you accept the text field properties that you
want. Then, enter the position for the lower left-hand corner of the
text. Template Editor will show the text field as a rectangular box filled
with a field name.
NOTE: Expect to see a minus sign (-) after the field name if the name
is shorter than the field length. The application will fill the field with
appropriate information when using it.
23
4 Menu Functions
Field
This lists the available fields and will be different for each application.
A list is defined in the file legend_text.fields.
Alignment
Length
This lets you specify the length (the number of characters) of a field.
Decimal places
This lets you specify the position of the decimal point in Number with
decimals type fields.
Sort order
This lets you specify the sort order for fields used when sorting row
and intermediate row lines. Only the fields having a sort order num-
ber will be taken into account when comparing and sorting lines.
There can be several text fields with number 0 (= no sort order), but
only one text field per order number. If same text field is used in row
and intermediate row component, they should have the same sort
order.
24
4 Menu Functions
NOTE: It is very important that the numbering for sort order is unique.
(All the fields taken into account must have different sort order num-
bers.)
NOTE: Sort order also has a dramatic effect when comparing rows.
Two rows are equal when all the fields having a non-zero sort order
number are equal.
Type
This lets you specify the field type as Number, Number with decimals
or Text.
Sum
This attribute defines whether the field is a sum-field, a field used for
collecting intermediate and total sum values for all fields. Depending
upon their sum level, sum-fields are identified by having one or two
plus signs (+ or ++) in front of the field name.
A sum-field will collect the sum value for all plotted fields having the
same name, with intermediate sums being set to zero whenever plot-
ted. Because total sums are cumulative they will not be set to zero
when plotted. For example, the +WEIGHT field collects all the values
of the WEIGHT field that have been generated since the previous
output. Similarly, the ++WEIGHT field collects all the values of the
WEIGHT field that have been generated since starting template out-
put.
Text fields can also be used to carry out calculations. Formulas are
entered same way as in Excel. E.g. =LENGTH + 100
Formulas are recognized, when the text field starts with equals sign
=. All the available table fields can be used, as well as mathematical
operators, parenthesis and ANSI-C math functions (sqrt(), sin(),
cos(), exp(), ceil(), etc.).
For example
• To get the field ASSEMBLY_TOP_LEVEL to return a value 4924
instead of +4.924, use the formula =ASSEMBLY_TOP_LEVEL*1000
and set the Type to Number.
• To join the text “Print date:” with DATE field, use the formula =%Print
date:% %DATE%
25
4 Menu Functions
Line styles...
For more information, please see the section titled “.Line style...” on
page 33.
Font...
Clicking this button opens the Font Settings dialog box that lets you
define the font for fields. The Font function is used in the editor and
the main application.
Radio buttons are used to define whether the font used for drawing
lines is individually defined for the selected object or whether it is a
font defined in the library. Modifying an individual font will only affect
26
4 Menu Functions
Library fonts
This function lets you access a list of fonts in the templates font
library.
Font
This function lets you select one of the available X-kit fonts (system
fonts with extension .fon): fixfont, romco, and romsim.
Select button opens a dialog box for selecting Windows fonts. Win-
dows fonts are supported only in drawing templates. In report tem-
plates they have no use. Only the font can be selected in the
Windows Font dialog box, the style and size are fixed.
Height
Width
This function lets you specify the ratio between font width and font
height.
Slant
This function lets you specify the slant angle of the text (in degrees).
To create a graphic field, select the desired properties for the field,
then choose a position for the lower left-hand corner of the drawing
area. Template Editor will show a graphic field as a rectangular box
27
4 Menu Functions
filled with a field name. The main application will fill the field with
appropriate information while using it.
Field
This panel shows the list of available fields and will be different for
each application. The list is defined in the file
legend_graph.fields.
Height
This field lets you specify the height of the drawing area in millime-
ters.
Width
This field lets you specify the width of the drawing area in millimeters.
28
4 Menu Functions
Line styles
This is a list of the line styles defined for the application. Use these
line styles when drawing vectors inside the drawing area. The appli-
cation documentation explains which line styles are used with which
fields.
Add...
This function lets you add a new line style to the list.
Delete
This function lets you delete a selected line style from the list.
Font
This lets you specify the font to be used when the application adds
texts within the drawing area.
4.2.4 Line
The line function lets you use the currently defined line properties and
pen settings to create a line between two selected points. Points can
be picked by clicking or dragging with the mouse.
Set and modify line properties with the Line Properties dialog box.
Pen
The text in this area tells you which pen is currently selected.
Bulge
This field lets you specify the curvature of an arc. For straight lines,
you should enter zero in this field.
4.2.5 Polyline
29
4 Menu Functions
To create a polyline, enter the start and end points for the first line,
then click or drag with the mouse to create the end points for addi-
tional lines. To end the polyline, click twice with the mouse.
4.2.6 Circle
To create a circle, enter the required center position and radius. The
circle will be created using the currently specified pen settings.
4.2.7 Arc
To create an arc, enter the required start and end points and the
desired curvature by clicking and dragging with the mouse. Because
the basic properties of an arc are similar to those for a line, you can
change them with the Line Properties dialog box.
Filled circles are created using the currently selected pen settings.
4.2.11 Text
When you create text it will reflect the current settings in the Text
Properties dialog box. To create a text string, type the text in the dia-
log box, then enter the starting point and text angle by clicking or
dragging with the mouse.
30
4 Menu Functions
Use the Text Properties dialog box to set the required properties for
new text or to modify existing text.
Text string
Font...
For more information see the section titled “Font...” on page 33.
Pen...
For more information see the section titled “.Line style...” on page 33.
Angle
4.2.12 Symbol
Use the Symbol Properties dialog box to select symbols and set
properties for new and existing symbols.
31
4 Menu Functions
File...
Click on the File button to open a file selection box for opening sym-
bol files. One file can include up to 256 symbols.
Select...
Click on the Select button to open the Select Symbol table for select-
ing symbols.
Height
This field lets you specify the height of the symbol in millimeters.
Width
This field lets you specify the width of the symbol in millimeters.
Slant
This field lets you specify the slant angle for the symbol (in degrees).
Angle
This field lets you specify the angle of rotation for the symbol
32
4 Menu Functions
Color
This field lets you specify the color for the primitives in a symbol with
transparent color.
Line width
This field lets you specify the width for lines with a transparent line
width setting.
This function opens a dialog box for defining and modifying library
line styles. Modifying a library line style modifies all the objects (of a
currently open template) that use the line style. For line style proper-
ties, see the section titled “.Line style...” on page 33.
4.2.14 Font...
This function opens a dialog box that lets you select and modify
library fonts. Modifying a library font modifies all the objects of a cur-
rently open template that use the font. For font properties, see the
section titled “Font...” on page 33.
4.3.2 Copy
This function copies selected objects into the cut buffer. If no objects
are currently selected, you can make a selection by dragging or click-
ing objects.
4.3.3 Paste
This function pastes objects from the cut buffer.
4.3.4 Move...
This function lets you move selected objects by entering the distance
to be moved in the Move Object dialog box.
33
4 Menu Functions
4.3.5 Clear
This function lets you clear the selected objects without affecting the
cut buffer.
4.3.6 Undo
4.3.7 Redo
4.5.1 Zoom
In
This function lets you zoom in and center the view around a point you
click inside a window.
Out
This function lets you zoom out and center the view around a point
you click inside a window.
34
4 Menu Functions
Original
This function lets you revert to the original area of a selected window
by clicking inside it.
Previous
This function lets you revert to the previous area of a selected win-
dow by clicking inside it.
4.5.2 Redraw
This function lets you click or drag to create a new zoom window for a
selected area inside an existing window.
4.5.4 Magnifier
This function deletes zoom windows. Select the zoom window you
want to delete by clicking inside it.
This function sets the current line style for all the objects and is the
same function that can be invoked from the Properties menu for
objects. See the section titled “.Line style...” on page 33.
35
4 Menu Functions
4.6.2 Font...
This function sets the current font for all the objects and is the same
function that can be invoked from the Properties menu for objects.
See the section titled “Font...” on page 33.
4.6.3 Grid...
Use the Grid Settings dialog box to specify the properties for the
underlying grid.
Width
Height
Grid X, Y
This function lets you specify the horizontal and vertical spacing of
gridlines. When working with report templates, horizontal spaces rep-
resent columns in an ASCII file while vertical spaces represent lines
in an ASCII file. We recommend that you use a one-millimeter inter-
val (in both directions) and corresponding font sizes to ensure the
best appearance.
Active
Visible
36
4 Menu Functions
4.6.4 Template...
Use the Template Settings dialog box to manage the general proper-
ties of the currently open template.
Template name
Template name should match the Type selected from the list.
Table type
Table types can be used for filtering and selecting items to lists. E.g.
ASSEMBLY type lists assemblies (only the assembly, not parts which
form the assembly) and single parts. PART type lists all parts but not
e.g. bolts or assembly information. ASSEMBLY_ALL lists both parts
and assemblies. For more information, see the System manual.
37
4 Menu Functions
Grid...
Clicking this button opens the same Grid Setting dialog box as the
menu function Settings->Grid...
Sort order
This setting lets you change the sort-order for a particular list. If, for
example, the application using templates sorts a list in alphabetic
order, selecting Down will put the alphabetically first item at the top of
the list. Conversely, selecting Up will put the alphabetically first item
at the bottom of the list.
Display type
NOTE: Though these settings let you switch between Graphic and
Text display types, this will cause loss of information because the
ASCII reports are unable to include graphic elements.
4.6.5 Page...
Use the Page Settings dialog box to specify properties for plotting or
printing any lists that use a template.
Rows on page
This field lets you enter the number of rows that will appear on each
page.
38
4 Menu Functions
Margin top...
The four margin fields let you define the positioning of the whole tem-
plate in the drawing/print file. Margin values are in millimeters in
Drawing Editor and columns and lines in Report Editor. As an exam-
ple, the left margin of a report can be set to four columns by entering
the Margin left value as “4”.
NOTE: This might cause extra redraws so you may want to turn this
option off on a slow computer. Automatic redrawing is disabled by
default.
This option controls how objects are selected when using area selec-
tions. If enabled, objects that are partially within a selected area will
also be selected. When disabled (the default), only those objects
completely within a selected area will be included.
This lets you specify whether picking multiple overlapping objects will
select all objects, or just the nearest one.
39
4 Menu Functions
40
5 Examples
5 Examples
5.1 Graphic template
The following example demonstrates an Tekla Structures template
made for assembly drawing parts lists.
The rule prints the row only when CLASS is ASSEMBLY and in other
cases lets the control go forward to the intermediate rows.
In this case, the intermediate rows are used for printing the part rows
using a different format than for the assembly row. The rule that is
written for the intermediate row ensures that only the parts (not bolts,
holes etc.) are plotted on the drawing table.
41
5 Examples
The footer part has two fields which are of the total sum type. These
fields calculate the sums of the AREA and WEIGHT fields.
Header is not present. A Page header will be printed at the top of all
pages.
Row includes five fields having a sort order and a number field which
cannot have a sort order value. The sorting order is as follows:
1. PROFILE
2. MATERIAL
3. LENGTH
4. AREA
5. WEIGHT
This ensures that all the different profiles will be different on the
report. (Two rows are equal if all fields having a non-zero sort order
are equal).
42
5 Examples
Only parts are accepted in this list. This is controlled by setting the
table type to PART (See the Tekla Structures System Manual).
This rule compares the PROFILE of the row that has just printed with
the PROFILE of the item to be printed next and prints the sums if the
profile type changes.
The left margin of the table parts row, intermediate row and footer has
been set to “2” to give the required indentation.
The footer part has two fields of the total sum type. These fields cal-
culate the sums of the AREA and WEIGHT fields.
43