Tải bản đầy đủ (.pdf) (45 trang)

tekla template editor

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (333.97 KB, 45 trang )



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

1
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
Table of contents
2
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
Table of contents

3
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
Table of contents
4
1 Using This Manual

5
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.
1 Using This Manual
6
2 About Templates


7
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
2 About Templates
8
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).
2 About Templates


9
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.
2 About Templates
10
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.
2 About Templates

11
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
2 About Templates
12
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
3 User Interface

13
3User 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.
3 User Interface
14
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.
3 User Interface

15
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
3 User Interface
16
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
4 Menu Functions

17
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.
4 Menu Functions
18
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.
4 Menu Functions

19
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.
4 Menu Functions
20
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.
4 Menu Functions

21
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
4 Menu Functions
22
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.
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.
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.

4 Menu Functions

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

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×