Vous êtes sur la page 1sur 45

Template Editor

Copyright© 1992-2003 Tekla Corporation. 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 pros-
ecuted 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.
Elements of the software described in this Manual may be the subject of pending patent applications in the European Union and/or
other countries.
Table of contents

Table of contents

1 Using This Manual..................................................................................... 5


1.1 Manual organization .......................................................................... 5
1.2 Other manuals ................................................................................... 5
1.3 Getting help ....................................................................................... 5
2 About Templates ....................................................................................... 7
2.1 Table parts......................................................................................... 7
2.2 Template objects ............................................................................... 9
2.3 Template settings and units............................................................... 9
2.4 Rules ................................................................................................. 9
2.4.1 Syntax............................................................................... 10
2.4.2 Functions .......................................................................... 11
2.4.3 Examples of rules ............................................................. 12
3 User Interface........................................................................................... 13
3.1 Screen Layout ................................................................................. 13
3.1.1 Pull-down menu ................................................................ 13
3.1.2 Icons ................................................................................. 13
3.2 Dialog boxes.................................................................................... 14
3.2.1 Using dialog boxes ........................................................... 14
3.2.1.1 Controls .................................................................. 14
3.3 Selection mechanism ...................................................................... 15
3.3.1 Selecting........................................................................... 15
3.3.2 Moving objects.................................................................. 16
3.3.3 Resizing objects ............................................................... 16
3.3.4 Rotating objects................................................................ 16
3.3.5 Summary of template operations...................................... 16

1
Table of contents

4 Menu Functions ....................................................................................... 17


4.1 File menu......................................................................................... 17
4.1.1 Open template... ............................................................... 17
4.1.2 Open report... ................................................................... 17
4.1.3 New template.................................................................... 17
4.1.4 New report... ..................................................................... 17
4.1.5 Save ................................................................................. 18
4.1.6 Save as............................................................................. 18
4.1.7 Import DXF... .................................................................... 18
4.1.8 Exit.................................................................................... 19
4.2 Create menu.................................................................................... 19
4.2.1 Template Component ....................................................... 19
4.2.1.1 Template Component properties ............................ 20
4.2.2 Text field ........................................................................... 23
4.2.2.1 Text field properties ................................................ 23
4.2.3 Graphic field ..................................................................... 27
4.2.3.1 Graphic field properties .......................................... 28
4.2.4 Line................................................................................... 29
4.2.4.1 Line properties ........................................................ 29
4.2.5 Polyline ............................................................................. 29
4.2.6 Circle ................................................................................ 30
4.2.7 Arc .................................................................................... 30
4.2.8 Filled circle........................................................................ 30
4.2.9 Filled box .......................................................................... 30
4.2.10 Filled area......................................................................... 30
4.2.11 Text................................................................................... 30
4.2.11.1 Text properties........................................................ 31
4.2.12 Symbol.............................................................................. 31
4.2.12.1 Symbol properties................................................... 31
4.2.13 .Line style... ...................................................................... 33
4.2.14 Font... ............................................................................... 33
4.3 Edit menu ........................................................................................ 34
4.3.1 Cut .................................................................................... 34
4.3.2 Copy ................................................................................. 34
4.3.3 Paste ................................................................................ 34

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

1 Using This Manual


This is the reference manual for Tekla Corporation’s Template Editor.
The following paragraphs explain how the manual is organized, sug-
gest different paths for different types of user and describe the other
manuals provided in the package. You will also find information to
help you in case you should encounter any problems with the soft-
ware or the manuals.

This document describes the functions and use of Template Editor


from the graphic template point of view. The functionality for creating
ASCII reports is a subset of the functionality needed for creating
graphic templates.

1.1 Manual organization


Chapter 2 includes a brief description of the templates.

Chapter 3 describes the general elements of the user interface.

Chapter 4 includes a detailed description of Template Editor function-


ality.

Chapter 5 includes two examples of templates.

1.2 Other manuals


The SymEd Reference Guide explains the creation of symbols which
can be included.

We also recommend that you consult the reference manuals for the
application in which you will use the templates.

1.3 Getting help


If you feel you have discovered a problem in the software, or if you
have comments or suggestions regarding any of the manuals accom-
panying this product, please report them to your local dealer or
directly to Tekla Corporation using the Product Maintenance Request
sheet at the back of this manual.

5
1 Using This Manual

6
2 About Templates

2 About Templates
What are templates?

Templates are descriptions of forms and tables that can be included


in an X-application. The forms may be graphical, for inclusion in
drawings as tables, text blocks or drawing headers. Alternatively,
they may be in ASCII text form for use in reports. At run time, the con-
tent of template fields is entered by the application that is using the
templates.

2.1 Table parts


A template consists of some combination of six different parts, a
header, page header, row, page footer, intermediate row and
footer. Not all parts need be present in every template; for example,
a drawing label will usually have only a header. Each part of the tem-
plate consists of lines, arcs, texts, fill areas and fields. Report tem-
plates are a subset of drawing templates and include only the items
that can be printed to ASCII-file.

Header

A header appears only once at the beginning of each template. There


can only be one header in each template.

Page header

A page header appears at the beginning of each page, or on odd or


even pages only, depending on the properties. On the first page, the
header appears before the page header. Page headers are used
mainly in reports, but can also be used in drawing templates when it

7
2 About Templates

is necessary to repeat specified labels, a certain number of rows


apart, throughout a table. A template can have several page headers
if, for example, different page headers are required for odd and even
pages.

Row

A row can be repeated several times while outputting the template,


the application using the template determining the number of rows to
be output. Rules can be used for controlling the row output, but only
one row can exist in each template. A row can consist of several
lines.

Sorting of the rows is done by the application using the templates,


sorting keys being defined by specifying sort order values for the
fields in a row.

Intermediate row

Intermediate rows can be used to produce additional or alternative


information to rows (intermediate sums, for example). There may be
several different kinds of intermediate row. The attributes define the
output order with rules being used to control the output of intermedi-
ate rows.

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

A footer is output after the page footer on the last page.

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

2.2 Template objects


A graphical template may contain combinations of the following com-
ponents:
• Lines (drawing)
• Fill areas (drawing)
• Symbols (drawing)
• Texts (drawing/report)
• Fields (drawing/report)

Report tables can only contain texts and fields.

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.3 Template settings and units


General template properties are as follows:
• The repeat direction, determining whether the table expands upwards
or downwards.
• The grid origin and the distance between grid points on the x and y
axes.
• The page margins (top, bottom, left and right) and the number of rows
on a page
(0 = no pages).

Graphical templates are defined in drawing coordinates using milli-


meters as the unit of measurement. You can scale the template in the
application when output has been finished. The position of the tem-
plate within the drawing coordinates doesn't matter because the size
of the template (width and height) is always calculated using template
objects such as texts, lines and fields.

NOTE: Because the size of a report template is linked to the ASCII


file columns and lines, it cannot be scaled.

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

Conditional expressions are always in the following syntax (brackets


are not obligatory)
if (expression) then
(expression)
else
(expression)
endif

Two comment styles are supported. A one-line comment starts with /


/ and ends at the next new line. The second style is useful for multi-
line comments. It starts with /* and ends with */.

Operators and their operands usually conform to normal C conven-


tions concerning evaluation order, allowed operand data types, type
conversions and function. The few exceptions are:
• '+' also accepts string operands, the meaning being string concatena-
tion.
• '==', '!=', '<', '>', '<=' and '>=' also support string operands, the mean-
ing being string comparison as defined by strcmp().
• '&&' and '||' do not guarantee evaluation only to the point of finding out
the result; instead, they always evaluate both operands.

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")

returns the attribute of the next line to be output

first()

returns TRUE if it is the first line

last()

returns TRUE if it is the last line

do()

outputs the line

pass()

passes the line (doesn’t even output the intermediate rows)

forw()

passes the line, but tries to output the intermediate lines

The following is an example of a rule that considers whether the inter-


mediate sum row should be printed or not:
if (curr("PROFILE")!=next("PROFILE")) then
do()
else
pass()
endif

11
2 About Templates

2.4.3 Examples of rules

Select a profile in PLATE LIST


if (curr("PROFILE_TYPE") == "B" &&
curr("MAIN_PART")==0 &&
curr("PART_POS")!=next("PART_POS"))
then do()
else forw()
endif

Select last drawing revision


if (curr("REVISION_NUM")>next("REVISION_NUM"))
then do()
else forw()
endif

Select parts in current phase


if(curr("SYSTEM")==curr("SYSTEM_ACTIVE"))
then do()
else forw()
endif

Select workshopbolts (two ways)


if (curr("CLASS") == "BOLT") &&
(curr("BOLT_SITE_WORKSHOP") == "Workshop") then
do()
else
forw()
endif

or :
if (curr("BOLT_SITE_WORKSHOP") == "Site") then
forw()
else
do()
endif

Select assemblies to be lotted


if(curr("LOT_NAME")!= "")then do()
else forw() 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.

3.1.1 Pull-down menu

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 Dialog boxes


3.2.1 Using dialog boxes

Dialog boxes present the application’s information to the user and


allow the user to enter data. Three periods after a description (e.g.
Condition...) indicate that a new dialog box will be displayed when
you click the item.

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.

This functionality provides the possibility to modify, for example, only


one property of several objects all of which have different properties.
This fills the dialog box attributes according to the attributes of the
selected object. The Modify Switch check boxes in front of the fields
define which attributes will be given the values.
Within any given dialog box, the
All values On/Off button toggles all the Modify Filter check boxes on
and off.

3.3 Selection mechanism


This section describes the use of the so-called Selector, a mecha-
nism that implements the object-action model in Template Editor. On
a three-button mouse, the Selector uses the left and middle mouse
buttons, the right button being reserved for the pop-up menu.

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.

To abort a dragging operation, press another mouse 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.

To deselect an object, use the left mouse button to click in an area


not occupied by any primitive.

3.3.2 Moving objects

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.

3.3.3 Resizing objects

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.

3.3.4 Rotating objects

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.

3.3.5 Summary of template operations

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.

4.1.1 Open template...

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.

4.1.2 Open report...

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.

4.1.3 New template...

This function opens a file selection box for naming and creating new
graphic templates.

4.1.4 New report...

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.

4.1.7 Import DXF...

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.

4.2 Create menu


4.2.1 Template Component

A template component is a rectangular area used to define which


objects belong to different template components. Template compo-
nents also defines the type and output condition of template compo-
nents. Within any given template, all objects should be placed inside
a template component. Objects outside all template components are
not handled in applications using templates. Objects having some
other conflict (for instance, those belonging to several template com-
ponents) are also discarded.

The template component rectangle is only visible in Template Editor.


Any application that uses templates will only use the properties con-
nected to template components.

19
4 Menu Functions

Template components are created by clicking the opposite corners of


a rectangle. A template component can either be created around
existing objects, or before creating template objects. Template com-
ponents cannot be stretched. To achieve the same effect, first get the
properties of the template component, then apply them. Finally,
delete the template component before creating a new one.

4.2.1.1 Template Component properties

When a template component is created it acquires the current prop-


erties from the Template Component Properties dialog box. This dia-
log box also lets you modify existing template components.

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.

Summary rows order

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.

Spacing and Indentation

The size of a template is defined by the box surrounding the objects


in it, not by the template component frame. You can use Spacing and
Indentation fields to define additional margins, specifying values in
millimeters for drawings, or in lines or columns for reports. Chapter 5
gives an example to demonstrate the use of margins.

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.

Library line styles

This function lets you view a list of line styles in a template’s line style
library.

Color

This function lets you specify line color.

Type

This function lets you specify line type.

Width

This function lets you specify line 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.

4.2.2 Text field

At run time, the application that is currently using a template may


enter values into text fields. The names and meanings of different
text fields are explained in the application’s reference manual.

Some text fields can be used on all template components. However,


some fields are only available for rows and intermediate rows. Please
consult the application manuals for more information.

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.

4.2.2.1 Text field properties

When a text field is created it is allocated the currently accepted


properties from the Text Field Properties dialog box. This dialog box
also lets you modify existing text fields.

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

This lets you specify either right, centre or left justification.

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.

Formulas on text fields

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

• To get the weight of assembly if it needs to be galvanized, use the for-


mula =ASSEMBLY_WEIGHT*1.2
• To get the weight of assemblies having the same position number, use
the formula =ASSEMBLY_WEIGHT*MODEL_TOTAL
• To get the “page/row” field in the drawing template, use the formula:
=%PAGE% %/% %ROW_IN_PAGE% and set the Type to Text.
• To round a length value up to the next integer, e.g. 4400mm to
5000mm, use the formula =ceil(LENGTH/1000)*1000

Note! Remember to select the correct type (Number with decimals,


Number, Text) for the field.

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.

Library font/Selected object only

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

an selected object. Modifying a library font (see the section titled


“Font...” on page 33) will automatically change all the objects that
share this font.

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

This function lets you select the font height in millimeters.

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

4.2.3 Graphic field

The relationship between a graphic field and an application using


templates is similar to that for a text field. Like text fields, graphic
fields are rectangular drawing areas within a template. Typical uses
for this function would be where a section of a raster map is located
within a template, or in a computer-aided design application where it
is necessary to draw the bent shape of a reinforcement bar. Please
see your application reference manual(s) for the names and mean-
ings of different graphic fields.

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.

4.2.3.1 Graphic field properties

When a graphic field is created it is allocated the currently accepted


properties from the Graphic Field Properties dialog box. This dialog
box also lets you modify existing graphic fields.

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.

4.2.4.1 Line properties

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.

Polylines are created according to the currently specified line proper-


ties and pen settings and can be modified using the Line Properties
dialog box. Modifying the Bulge setting will only affect one primitive,
not all the primitives forming any given polyline.

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.

4.2.8 Filled circle


To create a filled circle, enter the required center point and radius by
clicking or dragging with the mouse. This will create a fill area with
two arcs that emulate a filled circle.

Filled circles are created using the currently selected pen settings.

4.2.9 Filled box


This function lets you click or drag with the mouse to create a fill area
that emulates a filled box.

4.2.10 Filled area


To create any other type of filled area, first enter the vertex points that
will delimit its boundaries. If curved lines are required, create these
by dragging with the mouse. When you have created the shape, fin-
ish the fill area by clicking twice on the starting point or any other
point on the edge of the shape.

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

4.2.11.1 Text properties

Use the Text Properties dialog box to set the required properties for
new text or to modify existing text.

Text string

This indicates the text string that will be added or modified.

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

This function lets you specify the required text angle.

4.2.12 Symbol

X-kit symbols created with SymEd can be added to templates. To add


symbols, first select the symbol file and symbol from the Symbol
Properties dialog box. Then, pick a position for the symbol reference
point and specify the desired angle.

NOTE: Only symbols residing in the predefined symbol directory can


be used. This applies even if the file selection box lets you select
symbols from other directories.

4.2.12.1 Symbol properties

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.

4.2.13 .Line style...

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 Edit menu


4.3.1 Cut
This function cuts the 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.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

This function lets you undo the last command.

4.3.7 Redo

This function lets you redo the last undo command.

4.4 Properties menu


Properties of different objects, and their corresponding create com-
mands, are described in the section titled “Create menu” on page 19.

4.5 Window menu


Template Editor includes the standard windowing functions found in
most of Tekla Corporation’s programs. These include the capability
for zooming, panning and positioning inside a window.

4.5.1 Zoom

The following are the available zooming functions.

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 redraws all the views.

4.5.3 Create zoom

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

To create a temporary magnifier, click in a zoom window. Then, move


the cursor over the window you want to magnify. As you move the
cursor over the window that you are magnifying, the temporary mag-
nifier will move correspondingly. To stop magnification, click inside
the window.

NOTE: The graphics in the zoom window may behave strangely


while you move the cursor over the zoom window; this is normal.

4.5.5 Delete zoom

This function deletes zoom windows. Select the zoom window you
want to delete by clicking inside it.

4.6 Settings menu


4.6.1 Line style...

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

This function lets you specify the width of the grid.

Height

This function lets you specify the height of the grid

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

This function switches the grid on and off.

Visible

This function lets you show or hide an active grid.

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 are used by the application that is using templates.

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.

When a report is created all objects from database is possible to list


(and they go to row and intermediate row one by one). Table type is
the first filter. Rows and intermediate rows can be further filtered by
using rules. Table types, which can be used for filtering and selecting
items to lists, are defined in the file template.tables.

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

Display types may be either Graphic or Text. Choose the Graphic


option when templates will be used in drawings and Text when a tem-
plate will be used for ASCII reports.

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

4.7 Options menu


4.7.1 Automatic redrawing

If automatic redrawing is enabled, you will see a correct display after


each operation.

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.

4.7.2 Continuous action

This option toggles the continuous operation mode. If enabled, all


drawing functions are continuous and must be ended manually. The
option is disabled by default.

4.7.3 Partial window picking

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.

4.7.4 Multiple picking

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.

Header is not present.

Row includes three fields. ASSEMBLY_POS and PART_POS have


sort orders 1 and 2. MODEL_TOTAL does not have a sort order. The
row is used only for plotting the assembly line. This is managed with
the following rule:

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.

The following figure is an example of a table produced with the above


template.

5.2 Report template


The following is an example of an Tekla Structures report made for
material lists.

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

The intermediate row is used to print subtotals for different profiles.


The sum fields are of the intermediate sum type. Printing is controlled
by the following rule:

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.

This is a material list created with the above template:

43

Vous aimerez peut-être aussi