TE USG 430 en Template Editor User Guide
TE USG 430 en Template Editor User Guide
User’s Guide
Setting the visibility of texts, drawing objects and graphical fields in Template Editor................. 42
Changing the symbol and the symbol file in Template Editor.............................................................. 104
Importing AutoCAD and MicroStation files with import method defined in Template Editor..............108
Importing AutoCAD and MicroStation files with no import method defined in Template Editor.........110
Setting fill type and font import settings in Template Editor................................................................ 110
Limitations in AutoCAD and MicroStation file imports in Template Editor ......................................... 111
Adding comments to row rules and value field formulas in Template Editor...................................... 134
Conditional structure for row rules and formulas in Template Editor.................................................. 135
IsFirst................................................................................................................................................. 139
IsLast..................................................................................................................................................139
Output................................................................................................................................................ 140
PageBreak..........................................................................................................................................141
StepIn................................................................................................................................................. 141
StepOut.............................................................................................................................................. 141
StepOver............................................................................................................................................ 142
GetValue.............................................................................................................................................142
NextValue...........................................................................................................................................143
PreviousValue....................................................................................................................................143
Contents | viii
IsSet................................................................................................................................................... 143
GetFieldFormula................................................................................................................................ 145
CopyField........................................................................................................................................... 145
Sum.................................................................................................................................................... 147
Total................................................................................................................................................... 147
Count..................................................................................................................................................148
All........................................................................................................................................................148
find..................................................................................................................................................... 149
match................................................................................................................................................. 150
mid..................................................................................................................................................... 150
length................................................................................................................................................. 150
reverse................................................................................................................................................151
getat................................................................................................................................................... 151
setat................................................................................................................................................... 151
replace............................................................................................................................................... 152
toupper...............................................................................................................................................152
tolower............................................................................................................................................... 152
fvf....................................................................................................................................................... 153
newline............................................................................................................................................... 153
join......................................................................................................................................................154
join2....................................................................................................................................................154
asc......................................................................................................................................................155
int........................................................................................................................................................156
double................................................................................................................................................ 156
string.................................................................................................................................................. 156
format................................................................................................................................................ 158
Index...................................................................................................................................................170
Conventions used in this guide
Typographical conventions
Font Usage
Bold Any text that you see in the user interface appears in bold.
This font is used, for example, for window and dialog box ti
tles, box and button names, and list items.
Italic bold New terms are in italic bold when they appear in the current
context for the first time.
This font is also used for file names and folder paths, and for
any text that you should type yourself.
Noteboxes
Tip:
Note:
A note draws attention to details that you might easily overlook. It can also point you to other
information in this guide that you might find useful.
Template Editor User's Guide | Conventions used in this guide | 11
Warning:
You should always read very important notes and warnings, like this one. They will help you avoid
making serious mistakes, or wasting your time.
CAUTION:
This symbol indicates advanced or highly technical information that is usually of interest only to
advanced or technically-oriented readers.
Chapter 1. About Template Editor
Template Editor, also known as TplEd or TempEd is for creating, modifying and managing template
definitions in your products.
You can produce labels, reports and legends, allowing you to gather and produce accurate and targeted
information your product.
Tekla Structures features a number of ready-made templates and you can use Template Editor to modify
the existing template or create new ones to suit your needs.
• Modify the size and use of columns and customize template output.
• Print different page headers and footers by defining one of many different output options.
• Customize the way the row component is output when creating listings of product objects.
• Build a row hierarchy that reassembles the hierarchy of objects in the product database, and also
output a part list of a product object.
• Use free attributes to customize the way the template is output. Free attributes are product-
specific.
• Print company logos from picture files and use symbols from your product symbol files.
See also
Output options for templates created with Template Editor (on page 126)
Hiding template rows from output in Template Editor (on page 70)
Hiding value fields from output in Template Editor (on page 87)
Templates are used for a variety of different purposes, for example, to print a list of parts used in a
construction assembly, to denote the legend on an electrical network map, or to provide statistics on the
contents of the map such as city area, scale or date.
Graphical templates
Graphical templates are generally used to display map legends and labels, or project and company
information. In addition to text, they can contain graphics, such as tables, pictures or symbols. They can
also employ different font types and settings. Graphical template definitions have the extension .tpl.
Textual templates
Textual templates only contain text. They are primarily used for creating reports or listings of application
area-specific objects, for example in material lists of steel construction assemblies in Tekla Structures.
Template Editor User's Guide | 1 - About Template Editor | 14
You can modify the column settings in order to print templates with multiple columns.
You can use various font types, but they do not appear in the output template. If you want to use specific
font types in template output, you have to use a graphical template even if the template contains only text.
See also
Font properties for texts and value fields in Template Editor (on page 62)
See also
Drawing shapes Basic geometric shapes like lines, arcs, polylines rec
tangles, circles and polygons. They only appear in
graphical templates.
Text objects Static texts are headings or title line texts. Text objects
can appear in both graphical templates and textual
templates.
Field objects Template field objects are graphical fields and value
fields, which can be used to get data from the product.
See also
Modifying component and object properties in Template Editor (on page 47)
Drawing with the numeric pad in Template Editor (on page 60)
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
See also
If you right-click the mouse in the Workarea, a pop-up menu opens access to the most common viewing
and modifying operations.
See also
You can either dock the toolbars at the edges of the application window or leave them floating anywhere
on your screen.
Template Editor User's Guide | 2 - Template Editor user interface | 18
To show or hide a toolbar, click View > Toolbars and click the toolbar name. Visible toolbars have a check
mark beside their name. Template Editor saves and maintains toolbar visibility settings across sessions.
There are several things you can do to modify it in its relation to the Workarea:
• If you right-click in the Content Browser, a pop-up menu opens access to the most common
viewing and modifying operations.
• You can resize the Content Browser by clicking and dragging the divider between it and the
Preview Pane. Resize them both by undocking them and dragging from the window borders.
• You can also undock the Content Browser and move it outside of the main window.
• Collapse the Content Browser if you need more space in the Workarea to work with templates.
Click the arrow button to the right of the Sort and drawing order toolbar.
See also
Modifying component and object properties in Template Editor (on page 47)
You can resize it vertically by clicking and dragging the divider between it and the Content Browser.
Resize the Preview Pane and the Content Browser horizontally by undocking them and dragging from the
window borders.
Template Editor User's Guide | 2 - Template Editor user interface | 19
If you want to modify the properties, you must open the property dialog box for the selected part. You can
do that by clicking Edit > Properties.
See also
To... Do this...
Dock or undock the Content Double-click or drag the move handle at the top of the
Browser Content Browser.
Dock or undock toolbars Double-click or drag the move handle on the toolbar.
View or hide the Content Click View > Content Browser > Visible.
Browser
Collapse or expand the Con Click the arrow button next to the Sort and drawing
tent Browser order toolbar at the top of the Content Browser.
View or hide toolbars Click View > Toolbars > and the toolbar to view or
hide.
See also
Hiding value fields from output in Template Editor (on page 87)
Template Editor is a single document interface application, meaning you can have several instances of it
running at one time.
You can cut or copy template objects from one template and paste them into another one when multiple
instances are open.
◦ Drag with the middle mouse button (this is often the same as the scroll bar button).
You can also use the middle mouse button to pan in the template.
1. If you want to magnify the template, click the Zoom In button on the Zoom toolbar.
If you want to reduce the template to see more of it, use the Zoom Out button instead.
2. Click to zoom to the next preset percentage. The display centers around the point you click.
You can also drag to center the display around the selected area.
Template Editor User's Guide | 2 - Template Editor user interface | 21
You can also use the middle mouse button to zoom in and out.
Click Options > Preferences. The General tab is active by default. You can modify the settings in the
boxes listed below. Click OK to save the changes.
Always ask for import method Click this option if you want the Select Import
Method dialog box to appear whenever you im
port AutoCAD or MicroStation files.
Show TrueType fonts Select this if you want to use TrueType fonts in
Template Editor. If unselected, you can use only
Tekla fonts.
Use font cap height for new Select this if you want the font size to be calcu
graphical templates lated in the final output of a template exactly as
it has been defined.This means you have final
control over how the text is output.
Reset messages to visible Resets the user messages setting so that all
messages are displayed again.
See also
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Template Editor User's Guide | 2 - Template Editor user interface | 23
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
To modify Workarea preferences, click Options > Preferences and click the Workarea tab. You can modify
the color, line width and grid color.
Field Description
Header, Page header, Row, Page For each template component you can change the
footer, Footer color of the component frame (if you use presenta
tions, you select from pen names).
See also
Setting presentation file and pen settings in Template Editor (on page 32)
Template Editor User's Guide | 2 - Template Editor user interface | 24
Value field meanings Sets the definition file for value field mean
ings.
Work directory (*) Sets the initial working directory for Template
Editor. When opening or saving template files
it is automatically active in the file selection
dialog box.
Symbols, pictures (*) Sets the folders where you can insert symbols
and pictures from. You can define several di
rectories by separating them with semicolons
(;).
Fonts (*) Sets the folders containing font files. You can
define several directories by separating them
with semicolons (;).
Conversion fonts Sets the font map file to use in template con
version.
Conversion colors Sets the color map file to use in template con
version.
Fill import Sets the fill import map file to use in template
conversion and in AutoCAD and MicroStation
file importation.
Advanced options Sets a file where you can find additional attrib
utes to apply to value field formulas and row
rules.
See also
1. Click Options > Preferences and click the File Locations tab. The list of modifiable file locations is
in two columns.
The Type column contains the definition file type and cannot be modified. The Location field
contains the path for the definition file or directory and can be modified.
2. To set a definition file, click on the line that you want to modify and click the Select File button. This
opens the standard file selection dialog box.
3. To set a directory (*), click in the Location field on the line that you want to modify, and type in the
directory path, for example C:\Program Files\Company Product\symbols.
4. Click OK to accept or Cancel to discard the changes.
See also
For textual templates the distance between the grid points in the Workarea is fixed to one character unit
and you cannot change it. For graphical templates you can change the grid size to suit your needs.
See also
To activate the grid right-click in an empty area in the Workarea and click Grid > Snap on the pop-up
menu.
The check mark in front of the option indicates that the grid is activated.
You can also activate the grid by clicking the Snap check box in the Grid Settings toolbar.
Template Editor User's Guide | 2 - Template Editor user interface | 27
If you have drawn or added template objects before activating the grid, you can align them to the active
grid later on.
See also
You can set the distance between the grid points in graphical templates to aid drawing operations. Do the
following:
1. Click Options > Grid > Density. This opens the Grid Settings dialog box.
2. Type in the distance between the grid points by defining the Horizontal and Vertical values.
3. Click OK to save the changes.
You can also set the grid density in the Grid Settings toolbar by entering values in the Horizontal and
Vertical fields.
See also
To show or hide the template grid, right-click in an empty area in the Workarea and click Grid > Visible on
the pop-up menu.
Template Editor User's Guide | 2 - Template Editor user interface | 28
The check mark in front of the option indicates that the grid is visible.
You can also show or hide the grid by clicking the Visible check box in the Grid Settings toolbar.
Activating the grid does not automatically make it visible. Note that the grid can be visible without being
active.
See also
Starting Template Editor with the command line (on page 28)
Setting presentation file and pen settings in Template Editor (on page 32)
All command line options are case insensitive, so uppercase letters are equal to lowercase letters.
Template Editor User's Guide | 2 - Template Editor user interface | 29
-L <language id> Allows you to select the language for the Template
Editor user interface. <language id> is a three-letter
language identifier. Available languages depend on
your product. Please refer to your product documen
tation for information on available languages.
-i C:\My Documents\Product\Tem-
plates\mysettings.ini
-w <work folder> Allows you to set the work folder for Template Ed
itor. This folder is, for example, the base folder for
file open and save operations.
Shortcut Action
Shortcut Action
Shortcut Action
Ctrl+Page Down Moves the selected row to a lower level in the hierarchy.
Alt+Enter Opens the property dialog box for the selected item,
where you can modify the properties and settings.
The Content Browser pop-up menu commands contain the most common modifying operations and
allow you to change the location or hierarchy of row components, customize the view in the browser
or access properties of the selected part. Some of the commands are also available on the Sort and
Drawing order toolbar.
The Workarea pop-up menu commands contain the most common modifying operations, zooming,
panning and setting Template Editor drawing options. You can also open the properties dialog box of the
selected template, component or object.
See also
Setting the sort order of a value field in Template Editor (on page 83)
Modifying component and object properties in Template Editor (on page 47)
See also
Drawing with the numeric pad in Template Editor (on page 60)
A presentation file defines a set of pens that you can use when drawing. The presentation uses a color
map file that defines a set of product-specific colors. You can use a presentation in Template Editor only
if your product uses them. The pens and colors of the presentation file replace the Template Editor color,
line type and line width. This means you specify the color, line type and line width for a Template Editor
part that has these properties by selecting a pen.
Presentation files are created and modified with Presentation Editor (PresEd).
Do the following to define the default presentation file location in Template Editor:
1. Click Options > Preferences and click the Filie Locations preferences tab.
2. Click in the Presentation line and then click Select File.
3. Select the presentation file to use and click OK.
4. Click in the Color Map line and then Select File.
5. Select the color map file to use and click OK.
6. Click OK to apply the changes and close the Preferences dialog box.
The pens of the presentation appear in the template object property dialog boxes and can customize the
colors in the Template Editor Workarea.
See also
Template Editor only has basic tooltips that display the name of a command.
See also
Creating and saving a pre-defined template in Template Editor (on page 35)
To create a new template based on a pre-defined template, select a file from the pre-defined
templates section in the Template Types window.
3. Click OK.
An empty template opens in the Workarea and you are ready to begin working with the template. Or
in the case of a pre-defined template, one that is ready to be populated.
The standard file selection dialog box will appear for you to specify the name, save location and file
extension. Template Editor automatically adds the selected extension to the file name.
5. Click OK.
You can begin working with the template and add components and objects.
Template Editor User's Guide | 3 - Introduction to templates | 35
Note:
Templates created with version 3.60 or later are not compatible with previous versions because
of expanded attribute options.
See also
Creating and saving a pre-defined template in Template Editor (on page 35)
Do this when you often use the same kinds of templates for reports and summaries.
To... Do this...
Create a new template to save 1. Create a new template, complete with all of
as a pre-defined template. the required components and objects,
To... Do this...
• Global - The pre-defined template is saved in the same folder as the tpled.exe program, which is
common to all environments.
• Local - The pre-defined template is saved in the same folder as the tpled.ini file, which defines
environment-specific settings.
If you do not need the pre-defined template anymore, you can delete it. Do the following:
2. In the Template type dialog box that opens, select the pre-defined template you want to delete.
3. Click the red X on the right hand side of the dialog box and click OK.
4. Template Editor prompts you to accept or decline. Click Yes to delete the pre-defined template.
See also
If you receive a message regarding template conversion when you open a template, contact your service
representative for assistance if you do not know how to proceed.
If you have recently worked on a template, you can open it by clicking File > Recent Files, which
lists the ten most recent template files you have worked on.
If there are unsaved changes in any of the template files that you close, Template Editor asks if you
want to save them. Select the option that best suits your situation.
See also
Creating and saving a pre-defined template in Template Editor (on page 35)
Both graphical and textual templates require page and margin settings. The units used in the dimensions
of a template are based on the template type. Graphical templates use graphical units (Metric or Imperial)
and textual templates use character units.
For a graphical template meant to be a map legend or label, these settings specify the total width and
height of it.
To set and modify the template page settings and margin settings:
1. Double-click the template to open the Template Page Properties dialog box.
2. In the Output, Workarea and Margins areas, modify the following:
Template Editor User's Guide | 3 - Introduction to templates | 38
◦ Width and Height: set in graphical units or characters. There is an option for using
pagebreaks if the page height is exceeded. This is checked by default. If this is unchecked
then no page breaks appear in the output.
◦ View height: sets the page height for template design, but does not affect template output.
◦ Margins: sets the margins for the left, right and bottom of the template in graphical units or
characters.
◦ Use font cap height: sets how the font size is calculated and output in graphical templates.
It means that the text size will output exactly as defined.
You can also add notes about the template and assign free attributes to it.
See also
2. Click OK.
3. Be sure to use Save As to save the template with the new (and correct) file extension (.rpt for
textual templates and .tpl for graphical templates).
If you turn a graphical template into a textual template, only the text and value fields remain. All graphical
objects will be deleted.
Chapter 4. Template Editor components and objects
Templates are made up of components and objects. Template layout is designed with template components.
Template objects are inserted into template components.
Here you will find out more about common operations applied to template components and objects. Find out more:
Cutting, copying and pasting template components and objects (on page 46)
Modifying component and object properties in Template Editor (on page 47)
Tips for template component and object tasks (on page 57)
Template Editor inserts components in the following order: header, page header, row, page footer,
footer.
3. Click the object you want to insert and then click in the component to position it.
If you are inserting a line, circle or rectangle, you can see the size of it on the Status bar. The
object is added to the template with the current default properties, which you can modify. The
Rows and value fields are used widely and offer more functionality in terms of gathering and outputting
information.
Tip:
If you double-click a button on the Object toolbar, you can draw several objects without clicking
the button again. Press Esc or click another button to stop drawing.
Hold down the Shift key while moving an object to lock the movement horizontally or vertically.
Setting the visibility of texts, drawing objects and graphical fields in Template Editor (on page 42)
See also
Tips for template component and object tasks (on page 57)
Modifying component and object properties in Template Editor (on page 47)
If you draw an unclosed object and later decide to fill it, Template Editor will automatically insert a line to
close the shape.
See also
Modifying component and object properties in Template Editor (on page 47)
A dialog box appears prompting you to type in the text. You can type text on multiple lines. Press
the Enter key to move to the next line.
You can also insert a text object with the default string, simply click OK. The default string is
defined with the check box Set as default for new texts in the Text Properties dialog box.
Double-click the text to modify the text properties and font settings.
See also
Setting default properties for new template objects (on page 54)
Font properties for texts and value fields in Template Editor (on page 62)
If the field is placed inside a row component, note that the row content type may block some attributes
from use.
Template Editor User's Guide | 4 - Template Editor components and objects | 42
1. Click Insert > Graphical Field or click the Graphical field button.
2. Specify the insertion point:
You can also click the Attribute button to select an attribute from the attribute tree.
5. Click OK to accept the changes and close the property dialog box.
See also
Setting the visibility of texts, drawing objects and graphical fields in Template Editor (on page 42)
To... Do this...
Set the text, drawing object or 1. Insert a new text, drawing object or graphical
graphical field to always be field or double-click an existing one to open the
visible properties dialog box.
Set the text, drawing object 1. Insert a new text, drawing object or graphical
or graphical field to be output field or double-click an existing one to open the
under certain conditions properties dialog box.
To... Do this...
See also
The page header appears below the header, or if no header exists, at the top of the template page.
The page footer appears above the footer, or if no footer exists, at the bottom of the template
page.
2. Set the name, height and output policy of the page header / footer in the properties dialog.
3. You can specify if a page header or page footer should use columns by clicking the Use columns
check box.
4. Insert template objects inside the component.
See also
1. Start with setting the selection properties. Click Options > Pick > Partially.
The check mark next to the option indicates that the option is on, and parts that fall only partially
inside the drag frame are selected.
2. You can select multiple template components or objects or only one. Drag to make an area
selection in the Workarea.
3. Hold down the Ctrl key to select multiple objects (you can do this in the Content Browser too).
4. To deselect all components or objects, click in an empty space in the Workarea. To deselect one
component or object press the Ctrl key and click the part to deselect.
Template Editor User's Guide | 4 - Template Editor components and objects | 46
Selected parts appear highlighted in the Workarea and also show on the status bar. Only the most
recently selected part appears in the Content Browser.
Note:
If the Pick Multiple setting is deactivated, you can select only one part.
See also
To cut, copy and paste template components and objects, do any of the following:
To... Do this...
Paste the contents of the cut buffer Press Ctrl+V and click to give the insertion
point in the Workarea.
See also
The offset is the distance from the current coordinate point in graphical units. Positive values given
horizontally and vertically insert the object to the right and up.
3. Click OK.
See also
Cutting, copying and pasting template components and objects (on page 46)
To open the property dialog box for a template component or object, select and double-click the template
component or object in the Workarea or in the Content Browser.
Template Editor opens a component- or object-specific property dialog box. The changes you make there
update the component or object when you accept them by clicking OK.
Formatting template objects with format painter in Template Editor (on page 53)
Template Editor User's Guide | 4 - Template Editor components and objects | 48
Setting default properties for new template objects (on page 54)
For example, the names of value fields are used when referencing them in formulas or rules. So if you
modify the name of a value field after you have used it in formulas or rules, you must also change the
name in those formulas and rules. Template Editor does not update formulas or rules with the new name.
1. Select and double-click the component or object to open the properties dialog box.
2. In the Name field type in a new name for the component or object.
3. Click OK.
The name you give does not appear during output, but does appear in the Content Browser.
See also
Do the following:
1. Select the component or object and double-click to open the properties dialog box.
2. Depending on the template component or object modify the size, length or radius.
Template Editor User's Guide | 4 - Template Editor components and objects | 49
For some template objects, such as imported pictures, you can retain the aspect ratio by clicking
Keep aspect ratio in the properties dialog box.
Template components and objects can also be reshaped (and resized) by dragging the resize handles. To
do that select the component. If you hold down the Shift key while you drag, it will retain the aspect ratio.
Note that dragging the handles of polylines, polygons and free form areas is the only way to resize them.
When you resize template objects, you can see the measures of the objects on the Status bar.
See also
You can also move a template component by selecting it and dragging with the mouse.
Moving a template component also affects the sort and draw order during the final output.
See also
To crop a component:
Template Editor redraws the Workarea after you crop the template. Cropping cannot be undone once you
save the template, the effects of which appear in the final output template.
See also
Remember that you can only insert a header and a footer once in a template. In addition, if you change the
template component to a row, you must define the content type for the row.
Template Editor changes the component type in the Workarea and the Content Browser.
See also
Double-click the group to open the Object Properties dialog box to modify the group. If you want to
modify a single ungrouped item, double-click on it to open the properties dialog box.
Template Editor User's Guide | 4 - Template Editor components and objects | 51
Note:
• If the group contains different types of objects, for example shapes and texts, you cannot
modify its properties.
• If you modify the color properties of the group, the new color is applied to both lines and
fills.
See also
◦ Horizontal is a distance relative to the original position. Positive values insert the object to
the right.
◦ Vertical is a distance relative to the original position. Positive values insert the object up.
If you hold down the Shift key while moving an object, it locks the movement in the horizontal or
vertical depending on which direction you choose.
3. To see the results click Preview. If the settings are not to your liking, you can readjust them and
repeat the process.
4. Click OK.
See also
Do the following:
You can also make an area selection to select and trim many lines simultaneously.
The line is trimmed by the difference between the target line and the line you select to trim.
See also
Formatting template objects with format painter in Template Editor (on page 53)
Do the following:
You can also make an area selection and extend many lines simultaneously.
Template Editor User's Guide | 4 - Template Editor components and objects | 53
See also
Formatting template objects with format painter in Template Editor (on page 53)
The format painter does not work on template objects like groups, pictures, symbols or graphical fields.
Do the following:
Make an area selection if you want to format several template objects simultaneously.
See also
Heading Heading
Always visible / Visible You can use a rule to set the visibility of a
text during output. You can set the text to
always be visible during output, or apply
Template Editor User's Guide | 4 - Template Editor components and objects | 54
Heading Heading
Set as default for new texts Select the check box to save the settings
applied to all new texts.
See also
Font properties for texts and value fields in Template Editor (on page 62)
Setting the visibility of texts, drawing objects and graphical fields in Template Editor (on page 42)
1. Select an object that has the desired properties and object type.
2. Double-click to open the property dialog box for the object.
3. Click Set as default for new <template object>.
Note that if you modify other settings, the new ones are also applied to the currently selected
object.
Template Editor saves the settings and all newly created objects of the same type will have these
properties.
See also
Rotate objects, for example, when they need to appear rotated in the final output template.
Do the following:
The handle where you start dragging is the anchor point of the object as you rotate it.
If you need to specify a specific value, you can also open the properties dialog box and specify the slant
of the object in the Slant or Angle field.
See also
Modifying component and object properties in Template Editor (on page 47)
Template Editor User's Guide | 4 - Template Editor components and objects | 56
1. Select the objects that you want to align. Template Editor will align the objects according to the left
most, right most, bottom or top object in the selection.
If you hold down the Shift key while dragging, the object is moved only vertically or horizontally,
whichever has bigger the offset at the time.
2. Click Edit > Align and select which sides of the objects you want to align.
You can also click the related button on the Align toolbar.
This will change both the coordinates and size of the selected object(s) so they fit to the nearest grid
points.
See also
You can also trim the location of multiple objects by selecting them simultaneously.
Template Editor places the object so that X and Y coordinates are rounded to the closest millimeter (i.e
157.00) or 1/32 of an inch depending on what environment you are using. Check the Preview pane to see
the results.
Output options for template headers and footers (on page 58)
Drawing with the numeric pad in Template Editor (on page 60)
Font properties for texts and value fields in Template Editor (on page 62)
Setting presentation file and pen settings in Template Editor (on page 32)
Output options for templates created with Template Editor (on page 126)
Template Editor User's Guide | 4 - Template Editor components and objects | 58
Option Description
See also
To draw several objects running with 1. Click Options > Continuous Action to
the same tool turn the option on.
End continuous action When continuous action is on, you have to end
it: press the Esc button
See also
Do the following:
1. Click the line you want to drag and the handles appear.
2. Click the handle with your mouse and drag the line to the desired point.
To ensure the line has snapped to the right location, zoom in and make any needed modifications.
If the grid snapping settings are active, you may notice that lines will snap to the grid.
Template Editor User's Guide | 4 - Template Editor components and objects | 60
See also
If you do not have a numeric pad, you can draw a line object with the mouse and modify the properties of
the line with the Object Properties dialog box.
Do the following:
At the same time the line angle appears on the Status Bar.
If the grid is activated, the line will snap to the nearest grid point if you enter a length that places the end
point in between grid points. For example, if your grid points are 5 mm apart from each other and you
enter a length of 24, Template Editor will snap the line's end point to the nearest grid point. In other words,
Template Editor rounds the line length up or down.
See also
• If you have drawn objects before activating the grid, you can align them to the active grid later on.
• Activating the grid does not automatically make it visible. The grid may also be visible without
being active.
See also
To change the visibility of template objects click View > Content Browser and click the objects to view or
hide.
Template objects are still visible in the template and preferences are saved across sessions.
See also
Hiding template rows from output in Template Editor (on page 70)
Hiding value fields from output in Template Editor (on page 87)
Do the following:
1. Click the toolbar buttons of the template objects you want to exclude.
If you make an area selection, for example, and have excluded value fields, everything else will be
selected.
If you select objects of different types (i.e. lines and value fields), you cannot modify the properties
of both at the same time.
Toggle the buttons on and off as needed in order to modify template objects.
See also
In textual templates the font settings are used only in Template Editor, not in the output template.
Select and double-click a text or a value field to open the Text Properties or Value Field Properties dialog
box. Then open the Select Font dialog box by clicking the ... button in the Font area of the dialog box.
Property Description
Font type Set the font type and select from Tekla fonts (set in the
File Locations preferences dialog) or TrueType fonts (on
ly on the Windows platform). Template Editor auto-se
lects the font according to letters you type in the Font
field.
Font style Set the font style for TrueType fonts (regular, bold, italic,
bold italic).
Template Editor User's Guide | 4 - Template Editor components and objects | 63
Property Description
Slant Sets the slope of the font and applies only to Tekla fonts.
Color Sets the font color. If you use presentations, the pen sets
the color.
See also
Modifying component and object properties in Template Editor (on page 47)
Setting presentation file and pen settings in Template Editor (on page 32)
Search for text in the template with the keyboard shortcut Ctrl+F. The search is not case sensitive.
Template Editor searches through all components and objects in the template for the text you have
specified. Click the Find button to continue.
Chapter 5. Template rows
Template rows are versatile components that are used to create listings of objects that are in the product
database. You can insert multiple rows in a template. With rows you can sort, prioritize, hide and filter the
information you want to show in a template.
Modifying the content type of a row in Template Editor (on page 68)
Modifying the sort type of a row in Template Editor (on page 69)
Hiding template rows from output in Template Editor (on page 70)
Controlling row output with rules in Template Editor (on page 71)
If you want to use object-specific attributes in the row, you must select a content type from the list.
Depending on your product, you may be able to select several content types. Check one or more
content types from the list and click OK.
Being able to select more than one content type involves modifying the Template Editor .ini file.
Template Editor User's Guide | 5 - Template rows | 65
3. You can also insert the row without selecting a content type, by just clicking OK. Note that if you do
not select a content type, the value fields you insert in the row component will not be able to gather
the data from the product database.
4. Right-click to open the Row Properties dialog box and modify it, for example, the row rule to apply
to the row.
See also
Creating a template row rule with Rule Wizard (on page 73)
When you create a new row in the template, you should select a content type for the row. The content type
determines which template attributes can be used in that row.
See also
Modifying the content type of a row in Template Editor (on page 68)
Property Description
Content type Set the content type of the row to determine the object
being output from the product database.
Free attributes Apply free attributes to the row when you want to specify
product-specific information to a row.
Height Modify the height of the row (to fit template objects more
easily).
Sort type Set the sort type of the row in order to determine the final
output of rows.
Use columns Use columns to make better use of the space in a tem
plate.
See also
Modifying the content type of a row in Template Editor (on page 68)
Modifying the sort type of a row in Template Editor (on page 69)
Hiding template rows from output in Template Editor (on page 70)
Field Description
Start from Sets the starting point for column distribution. Setting
this helps eliminate white space and influences the vi
sual output of templates.
• Top left
• Top right
• Bottom left
• Bottom right
Field Description
Fill policy Fill policy determines how the columns are filled in the
template:
Tip:
If you want to fix the number of columns, give the same values to Min. count and Max. count.
Then the template is always output with this number of columns.
See also
1. Select and double-click the row to open the Row Properties dialog box.
2. Select the Content type from the list.
3. Click OK to save the changes.
See also
Template Editor User's Guide | 5 - Template rows | 69
Modifying the sort type of a row in Template Editor (on page 69)
The default sort type is to combine similar rows so that only the last one of them is output.
1. Select and double-click a row to open the Row Properties dialog box.
2. Choose the Sort type from the list:
◦ Combine - output lines are sorted and duplicate output lines are combined so that only the
last of them is output.
◦ Distinct - output lines are sorted and all lines are output.
If you click Combine or Distinct, you must also select which value fields affect the sorting and how.
If you click Combine, you can also automatically get calculated sums of the information on combined
lines.
See also
Setting the sort order of a value field in Template Editor (on page 83)
Setting the priority of a value field in Template Editor (on page 84)
Modifying the content type of a row in Template Editor (on page 68)
Hiding template rows from output in Template Editor (on page 70)
Template Editor User's Guide | 5 - Template rows | 70
When you are designing the template, you cannot line up rows in columns. Columns will render when the
template is output.
Template Editor cannot visualize several columns, but the column settings determine the width of row
components. These column settings are common to all rows in a template. If the template is output to
multiple columns, an individual row can still be printed using the whole width of the page.
1. Select and double-click a row to open the Row Properties dialog box.
2. Click the Edit button next to the Use columns check box.
3. Modify the column settings in the Common Settings dialog box.
4. Click OK to save the changes.
See also
1. Select and double-click a row to open the Row Properties dialog box.
2. Click the Hide in output check box.
3. Click OK to save the changes.
Only the following things can exclude the row from output when the template output process is going on:
• The row content type does not match the object that is being processed. You can select the
product object type that you want to handle in a row when you modify the content type of the row.
• Row rules are used to filter out the object that is being processed or prevent output of the row for
another reason. You can set the conditions for output when you modify row rules.
Template Editor User's Guide | 5 - Template rows | 71
See also
Modifying the sort type of a row in Template Editor (on page 69)
On the Sorting and drawing order toolbar above the Content Browser, click the button to shift the
row down a level.
3. You can also drag the row to the new location in the Content Browser.
4. Click Save to retain the changes.
Note that you can see the changes in the hierarchy levels only in the Content Browser. There is no limit
to the number of hierarchy levels to use, but hierarchies deeper than three levels affect the performance
during output and may be difficult to work with.
See also
By default, all rows of a template are output for each processed database object. The easiest way to
control output is to use a row content type; in which case the row is output only if the processed object
Template Editor User's Guide | 5 - Template rows | 72
type and content type match. If this is not a sufficient condition, then you need row rules, for example, in
the following cases:
• You need to step over a row. For example, a summary row may be output only when all objects of a
type have been processed and before starting to process different types of objects.
• You need to step out from processing a database object and continue with the next object. This
means that processing continues from the first row of the template (or from the rows higher in the
hierarchy).
Note:
Template Editor sorts all rows according to value field sort settings before the rules are read.
Remember to set sorting order for all value fields that you use in row rules. This way rows will be
correctly sorted. You can hide unnecessary value fields from the output. Do that in the Value Field
Properties dialog box.
You can create row rules in the Rule Wizard dialog box or the Rule Contents dialog box.
Creating a template row rule with Rule Wizard (on page 73)
Overriding template object colors with row rules in Template Editor (on page 77)
You can define the content type of the row and modify other properties if you have not done that
previously.
3. Inside the conditional statement you can use predefined attributes, already created value fields or
combination of these with various data and string operations and formulas.
4. To save the rule for future use, click Store.
a. Give the rule a name in the dialog box that appears.
b. Click OK to save the changes.
5. Click OK to close the Rule Contents dialog box.
6. Save the template.
If you need to rewrite the rule or delete it completely, press Clear to delete the rule in the Rule Contents
dialog box.
See also
Creating a template row rule with Rule Wizard (on page 73)
Controlling row output with rules in Template Editor (on page 71)
1. Select a template row and double-click to open the Row Properties dialog box.
You can define the content type of the row and modify other properties if you have not done that
previously.
It is used for filtering content in rows. The conditional structure is already a part of the rule in the
Rule Wizard.
3. Select the Attribute to which the rule refers.
4. Add the conditions which apply to the rule by selecting from the list.
5. Type in the Value. If it is a string, enclose it in quotation marks "".
6. Click OK to save the changes.
7. Click OK to close the Row Properties dialog box.
If you want to save the rule for later use, click Advanced and then click Store in the Rule Contents dialog
box.
See also
Controlling row output with rules in Template Editor (on page 71)
Property Description
Property Description
Value field functions Lists value field functions that can calculate
sums or counts of value fields of this template.
Click Select to open a more extensive attribute
list.
See also
Creating a template row rule with Rule Wizard (on page 73)
Template Editor User's Guide | 5 - Template rows | 76
Adding comments to row rules and value field formulas in Template Editor (on page 134)
Conditional structure for row rules and formulas in Template Editor (on page 135)
1. Select and double-click a template row to open the Row Properties dialog box.
2. To modify a simple rule click Wizard. To modify a more advanced rule click Advanced.
3. In the Rule Contents dialog box, click the Check button to ensure the syntax of the rule is correct.
4. Click OK to save the changes.
5. Save the template.
See also
Creating a template row rule with Rule Wizard (on page 73)
Choose from several colors that you can use in Template Editor. Valid color names are black, white, red,
green, blue, cyan, yellow, magenta, brown, darkgreen, navyblue, greenblue, orange and gray. In addition you
can use difference shades of gray by name in the row rules: Gray30, Gray50, Gray70 and Gray90.
Do the following:
Numeric id values for colors are also accepted as defined in extended_colors.map colormap file.
1. Select the row to which you want to apply the rule and double-click to open the Row Properties
dialog box.
2. Click Advanced to open the Rule Contents dialog box.
3. Create the row rule. Use the Output control function with the following syntax in the row rule to
define the color override.
Output("#<key>=<color>;")
The following abbreviations are keys that refer to the template objects in question:
You can combine these values in one row rule using a semicolon as a separator.
4. Click Check to ensure the rule syntax is correct. Make corrections if necessary.
5. Click OK to save the rule and close the Rule Contents dialog.
6. Click OK to close the Row Properties dialog.
7. Save the template.
Result: This rule overrides the colors when the LENGTH attribute is longer than 1000. Value fields are
orange, text objects are yellow and the drawing color is blue (i.e. lines are blue.
See also
Global pre-defined rules are read-only so they cannot be deleted from the menus in Template Editor.
Global pre-defined rules are also stored in a different place than the user rules.
User rules are stored in a pre-defined rules file (extension .pdr). The file is specified in the File Locations
preferences. These rules can be freely added and deleted in the Rule Contents dialog box.
See also
See also
Modifying the sort type of a row in Template Editor (on page 69)
Chapter 6. Value fields in Template Editor
Value fields contain textual information. The field contents are references from the product database
when the template is output. The data to retrieve is specified with value field formulas.
The size of the field is expressed in characters. In graphical templates the final size of the value field
depends on the font size and type settings.
Setting the sort order of a value field in Template Editor (on page 83)
Setting the priority of a value field in Template Editor (on page 84)
Setting the data type of a value field in Template Editor (on page 84)
Setting the layout of value fields in Template Editor (on page 86)
Resizing value field fonts automatically in Template Editor (on page 86)
Hiding value fields from output in Template Editor (on page 87)
Aligning value field texts in output in Template Editor (on page 88)
If you want to insert the value field without defining an attribute, just click OK.
4. You can define a formula for the field by clicking the Formula button and specifying which data to
gather.
You can skip this step and leave the formula undefined, in which case Template Editor inserts a
default value.
5. Click OK.
The value field appears in the template component with a Template Editor-generated name.
If a value field formula consists of a single attribute function, Template Editor automatically sets the Data
type, Justify (alignment), Length, Meaning and Unit properties. Depending on the Unit property, Precision
or Decimal properties are also set. The values are read from the global attributes definition file.
See also
Property Description
Property Description
Line count You can add multiple lines of text to a value field,
for example, if it has a long description.
Align to top Check this option when you want to align the con
tent of multi-line value fields to the top. The default
value is to align the content to the bottom.
Output 0 as an empty string Select the check box to output the value field with
a value of zero as an empty string.
Template Editor User's Guide | 6 - Value fields in Template Editor | 82
Property Description
Hide in output Select the check box this to exclude value field
from output.
Value field meaning Defines the format for the value field and is prod
uct-specific. Format, for example, can be Length,
Weight, Force, etc.
Layout properties Modify the Font, Length of the field and the justifi
cation settings for the value field.
Field order Value field order is determined by the sort type ap
plied to the row in the Row Properties dialog box.
Sort type must be defined in order to use this op
tion.
Set as default for new value Select the check box to save the settings applied
fields to all new value fields.
See also
Setting the data type of a value field in Template Editor (on page 84)
Hiding value fields from output in Template Editor (on page 87)
Modifying the sort type of a row in Template Editor (on page 69)
Setting default properties for new template objects (on page 54)
For example, a value field meaning Weight might add a unit postfix such as kg or lbs to the value field
value.
See also
1. Select and double-click the value field to open the Value Field Properties dialog box.
2. Select the Order in the list:
◦ None
◦ Ascending (A to Z)
◦ Descending (Z to A)
You can determine the sort order only if the surrounding row component has Sort type defined. If you
want to sort by multiple fields, you must set the sort order for each one of them and the sort priority for
each field.
See also
Setting the priority of a value field in Template Editor (on page 84)
Setting the layout of value fields in Template Editor (on page 86)
Do the following:
4. Repeat steps 2 and 3 until the field positions are correct. The most important field in sorting should
appear in the upper-most position.
You can also drag the value fields in the Content Browser to arrange them in the desired position. The
move operations described here do not affect the physical coordinates of the value field, only the sorting
properties.
See also
Setting the sort order of a value field in Template Editor (on page 83)
Setting the data type of a value field in Template Editor (on page 84)
1. Select and double-click the value field to open the Value Field Properties dialog box.
2. Select the Data type in the list:
◦ Number - an integer
◦ Number with decimals - a decimal number, set the number of decimals in the Decimal field.
3. Select the Meaning to apply from the list and then select the Unit.
If the Unit applies the precision property, set it in the Precision list.
4. Click OK.
Be sure that the data type matches the outcome of the value field formula. For string operations, for
example, the Data type should be set to Text.
See also
Setting the priority of a value field in Template Editor (on page 84)
Setting the layout of value fields in Template Editor (on page 86)
Value field meanings are formatting for value fields applied at run-time. The list of available meanings and
their effect is product-specific.
1. Select the value field you want to modify and double-click it to open the Value Field Properties
dialog box.
2. Select an option from the Meaning list that best describes the meaning of the output of the value
field.
For example, a value field meaning for Weight might add a unit postfix such as kg or lbs.
See also
Setting the sort order of a value field in Template Editor (on page 83)
Setting the priority of a value field in Template Editor (on page 84)
Setting the data type of a value field in Template Editor (on page 84)
Setting the layout of value fields in Template Editor (on page 86)
1. Select and double-click a value field to open the Value Field Properties dialog box.
2. In the Layout section, set the following:
See also
Do the following:
Template Editor User's Guide | 6 - Value fields in Template Editor | 87
1. Select the value field you want to modify and double-click to open the Value Field Properties dialog
box.
2. Click the Free attributes button to open the Free attributes dialog box.
3. In the Application tab, click the Name list and select from the following options:
◦ Min. font size - The font will not be resized under any value you have specified. Be aware
that all the content might not fit in the value field in this case.
◦ Font size change - The font is resized by the value you have defined (i.e. 0,2), reducing it by
that amount until it fits in the value field or the minimum font size is reached.
◦ List of font sizes - The font is resized based on the list of values given until the right size
font is found or the minimum font size is reached. You can decide what values to use. The
separator in the list a semi-colon.
4. Click Add.
If you define both Font size change and List of font sizes, List of font sizes will override the former.
When the template is output the font will be resized to settings you specified.
See also
1. Select and double-click the value field to open the Value Field Properties dialog box.
2. Select Hide in output.
3. Click OK to save the changes
Even though the field is hidden from output, it can still be used in formulas and rules in the same way as
visible fields.
See also
Setting the sort order of a value field in Template Editor (on page 83)
Template Editor User's Guide | 6 - Value fields in Template Editor | 88
Setting the priority of a value field in Template Editor (on page 84)
Format a value field when you want to show units and meanings in output.
1. Select the value field and double-click it to open the Value Field Properties dialog box.
2. In the Format area of the dialog box, select a product-specific value field meaning in the Meaning
list. Select the unit for the value field in the Unit list.
If decimals are used, set the number of decimals in the Decimals field. If precision is used, set it in
the Precision list.
See also
Setting the data type of a value field in Template Editor (on page 84)
Setting the layout of value fields in Template Editor (on page 86)
1. Select the value field and double-click it to open the Value Field Properties dialog box.
2. Select the alignment option you want from the Justify list (Left, Center or Right).
3. Click OK to save the changes.
When you select the value field, you can see the justification settings in the Preview Pane.
Template Editor User's Guide | 6 - Value fields in Template Editor | 89
See also
Hiding value fields from output in Template Editor (on page 87)
Create formulas by applying various functions and operators in the Formula Contents dialog box.
Get a single piece of data from the database in Template Editor (on page 93)
Creating a listing of template objects from the database (on page 94)
1. Select the value field to modify and double-click it to open the Value Field Properties dialog box.
2. Click Formula to open the Formula Contents dialog box.
3. You can create, modify and check the content of value field formulas in this dialog box. You can
select functions and parameters from the lists or type them in the Formula text field.
4. Click Check to ensure that the formula syntax is correct. Make corrections if necessary.
5. Click OK to save the formula and close the Formula Contents dialog box.
6. Set the output properties of the value field to match the outcome of the formula.
7. Click OK to accept the changes in the Value Field Properties dialog box.
Note:
If a value field formula consists of a single attribute function, Template Editor automatically
sets the Data type, Justify (alignment), Length, Meaning and Unit properties. Depending on the
Unit property, Precision or Decimal properties are also set. The values are read from the global
attributes definition file.
See also
Property Description
Attribute Lists attribute functions for getting data from the product
database. Click Select to open a more extensive attribute
list and click More to use advanced options.
Value field functions Lists value field functions that can calculate sums or counts
of value fields of this template. Click Select to open a more
extensive attribute list.
Property Description
See also
Adding comments to row rules and value field formulas in Template Editor (on page 134)
Conditional structure for row rules and formulas in Template Editor (on page 135)
1. Select the value field and double-click it to open the Value Field Properties dialog box.
2. There are several ways to modify a value field formula:
Template Editor User's Guide | 6 - Value fields in Template Editor | 93
◦ Click the Attribute button and select the appropriate attribute from the attribute tree.
◦ Click the Formula button. This opens the Formula Contents dialog box where you can
modify the formula.
Click Check to ensure that the formula syntax is correct. Make corrections if necessary.
3. Click OK to accept the changes and close the Formula Contents dialog box.
4. Set the output properties of the value field to match the outcome of the formula.
5. Click OK to accept the changes in the Value Field Properties dialog box.
Note:
If a value field formula consists of a single attribute function, Template Editor automatically
sets the Data type, Justify (alignment), Length, Meaning and Unit properties. Depending on the
Unit property, Precision or Decimal properties are also set. The values are read from the global
attributes definition file.
See also
Get a single piece of data from the database in Template Editor (on page 93)
Creating a listing of template objects from the database (on page 94)
Use value fields to get data from your product's database. The available database objects and properties
are listed in the global attributes definition file. Apply attribute functions in value fields.
Template Editor User's Guide | 6 - Value fields in Template Editor | 94
Do the following:
◦ GetValue
◦ PreviousValue
◦ NextValue
See also
Creating a listing of template objects from the database (on page 94)
The listing of objects is created when you create a report based on this template in your product. The rule
of the row in question has an effect on the final output of the listing.
See also
Get a single piece of data from the database in Template Editor (on page 93)
Do the following:
1. Ensure the Sort type of the row containing the value field is set to Combine. This ensures that you
will be outputting only summary rows instead of repeating lines with information on individual
database objects.
2. Select the value field to sum and double-click to open the Value Field Properties dialog box.
3. You have these choices:
◦ Click Don't sum values if you do not want any summaries made.
◦ Click Sum values across all rows to sum all of the similar values of all rows.
◦ Click Sum values within one row to add up all of the values of one row. All other rows are
ignored.
If you want to print the number of combined output lines, add a value field with the attribute "NUMBER".
If you do not want to combine lines but rather output each line and a summary row with an intermediate
sum after them, we recommend that you use the Sum value field function to calculate the sum.
See also
Modifying the sort type of a row in Template Editor (on page 69)
Get a single piece of data from the database in Template Editor (on page 93)
Creating a listing of template objects from the database (on page 94)
Template Editor User's Guide | 6 - Value fields in Template Editor | 96
1. Select and double-click the value field to open the Value Field Properties dialog box
2. Select Output 0 as empty string.
3. Click OK to save the changes.
See also
Setting Tekla Structures advanced options for value fields (on page 97)
See also
Tekla Structures retrieves the selected language from the .ail file that contains the language strings. The
result always shows in the native language and native units.
GetValue("XS_ADVANCED_OPTION_NAME")
5. In the Value Field Properties dialog box, ensure that you select the right Data type for the value
field in question: Number, Number with decimals or Text.
6. Click Check to see if the formula syntax is correct. If you see an error message, you can click OK to
continue.
7. Click OK to close the Formula Contents dialog box. If another error message appears, you can
ignore it.
The reason for the error indicating unknown attributes could be due to a spelling error (if you have typed
it in) or because the advanced options are not listed in the contentattributes_global.lst or
contentattributes_userdefined.lst files.
Both symbols and pictures are inserted with a reference to the original file. If you modify the symbols and
pictures outside of Template Editor, the changes also affect the template that contains this symbol or
picture, as the file contents are reloaded each time the template is opened.
Viewing and modifying symbol file contents in Tekla Structures (on page 103)
Changing the symbol and the symbol file in Template Editor (on page 104)
Setting paths for symbols and pictures in Template Editor (on page 106)
Before you start inserting symbols or pictures into templates, you should ensure that the path for symbol
files has been set correctly in the File Locations preferences dialog box.
See also
See also
Changing the symbol and the symbol file in Template Editor (on page 104)
Viewing and modifying symbol file contents in Tekla Structures (on page 103)
Setting paths for symbols and pictures in Template Editor (on page 106)
To insert a picture:
Select the picture in order to position it properly or right-click it to modify the properties or select a
different picture file.
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 100
See also
Logos (pictures) can be of the following file formats: BMP, GIF, GRD, JPG, PPM, PGM, PNG, RLE, TIFF or
XKRL.
The logo appears in the template and in the Content Browser as a Picture.
See also
Setting paths for symbols and pictures in Template Editor (on page 106)
Property Description
Keep aspect ratio Select the check box if you want to retain the as
pect ratio of the symbol.
Slant, Angle The slant value sets the slope of the symbol.
Set as default for new symbols Select the check box to save the settings applied
to all new symbols.
See also
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 102
Property Description
Keep aspect ratio Select the check box if you want to retain
the aspect ratio of the picture.
Fit inside Select the check box if you want the pic
ture to fit inside the template component.
Set as default for new pictures Select the check box to save the settings
applied to all new pictures.
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 103
See also
1. Open the Mark content - symbol dialog box by selecting Symbol from the available mark elements
list in the mark properties dialog box, or by opening the Symbol properties dialog box by selecting
Annotating > Properties > Symbol.
2. Click Select next to the File box.
3. Select a file from the Symbol Files list and click Edit.
4. If you modify the file in the Symbol Editor, save the file by clicking File > Save or File > Save As and
giving the symbol file a new name.
5. Click OK.
Note:
In Symbol Editor, you can copy symbols between symbol files (*.sym). Press Ctrl +C and select
the symbol you would like to copy, then open the symbol file you want to copy to (or a new
symbol file), select the location for the symbol and press Ctrl+V.
See also
Setting paths for symbols and pictures in Template Editor (on page 106)
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 104
Do the following:
1. Select a symbol and double-click to open the Symbol Properties dialog box.
2. Click the ... button on the right of the Identifier box.
To change the symbol file, click the... button on the right of the File box.
See also
Ensure you have set the File Locations preferences before you begin.
Do the following to apply a rule to the symbol that has already been inserted into the template
component:
Here is an example of a rule that includes a symbol. The symbol library and the symbol id are
separated by a @ character and they must appear in the rule.
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 105
4. Click the Check button to ensure the syntax of the rule is correct.
5. Click OK to save the changes.
6. Save the template.
The symbol will be output according to the rules you have applied to it.
See also
Ensure you have set the File Locations preferences before you begin.
Do the following to apply a rule to the picture that has already been inserted into the template component:
Here is an example of a rule that includes a picture. The name of the picture file must appear in the
rule.
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 106
4. Click the Check button to ensure the syntax of the rule is correct.
5. Click OK to save the changes.
6. Save the template.
The picture will be output according to the rules you have applied to it.
See also
If you want to modify the contents of symbol files, you must do it with Symbol Editor.
See also
Modifying component and object properties in Template Editor (on page 47)
1. Click Options > Preferences and click the File Locations tab.
2. Click in the Symbols and pictures (*) line in the Location field and type in the directory paths.
Template Editor User's Guide | 7 - Symbols and pictures in Template Editor | 107
To give several paths, separate paths using a semi-colon. For example "C:\pictures;C:\Product
\symbols".
See also
Viewing and modifying symbol file contents in Tekla Structures (on page 103)
Changing the symbol and the symbol file in Template Editor (on page 104)
Chapter 8. AutoCAD and Microstation files in
Template Editor
You can use AutoCAD (DXF or DWG) files and MicroStation (DGN) files in graphical templates. Template
Editor imports the files and converts their contents to a group of shapes, so you can modify the imported
data.
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
Setting fill type and font import settings in Template Editor (on page 110)
Limitations in AutoCAD and MicroStation file imports in Template Editor (on page 111)
AutoCAD and Microstation import errors in Template Editor (on page 112)
Modifying imported AutoCAD and MicroStation files in Template Editor (on page 113)
To import a file:
◦ Import by Scale - Template Editor multiplies the dimensions of the original file and will resize
the component if the scale results in an image size that is larger than the component.
◦ Import by specifying Dimensions - Type the values in the Horizontal and Vertical fields.
Templated Editor maintains the aspect ratio when the file is inserted.
◦ Import in the Maximum Size - Template Editor inserts the file in the maximum possible size
without resizing the component.
5. You can also select whether the file is imported to the nearest rounded unit (millimeters or
inches). Click the check box for Round object locations to the closest <unit of measure you have
specified>.
6. Click OK to insert the file into the template component.
7. You can modify the file if needed, for example, by ungrouping it and modifying individual file
objects.
Note:
If you have designed a template with AutoCAD, you can use free attributes in AutoCAD to mark
value fields. Template Editor converts them automatically to value field objects as the file is
imported. Template Editor uses the name and the value of the AutoCAD free attribute as the
default contents for the value field. For example, a free attribute named REVNO with the value xx
is converted to a value field with the formula GetValue("REVNO").
See also
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
Setting fill type and font import settings in Template Editor (on page 110)
Limitations in AutoCAD and MicroStation file imports in Template Editor (on page 111)
AutoCAD and Microstation import errors in Template Editor (on page 112)
To import a file:
The image is inserted in the template. You can ungroup it if you need to modify parts of the image.
See also
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Limitations in AutoCAD and MicroStation file imports in Template Editor (on page 111)
AutoCAD and Microstation import errors in Template Editor (on page 112)
The fill type import file is an ASCII file, so it can be modified with any text editor. Each text line in the
example below has a Template Editor fill type id and a DWG/DXF/DGN fill type name. This is a five-line
example of a fill type mapping file.
Template Editor User's Guide | 8 - AutoCAD and Microstation files in Template Editor | 111
The table below lists the available fill type ids and names that you can combine in the way you want. Each
row describes the default mapping Template Editor uses if the fill settings remained unchanged.
See also
Limitation Description
Object type limitations Only the following object types are imported from
the original files: ARC, LINE, CIRCLE, CELL, CURVE,
SHAPE, SOLID, TEXT, TRACE, INSERT, POLYLINE,
LWPOLYLINE, LINESTRING, HATCH and FREE AT
TRIBUTE (AutoCAD).
Text limitations The fonts used in text objects are mapped to Tekla
fonts. This may slightly distort the font alignment
within the text objects as the original font geometry
is not available in Template Editor. Text objects that
Template Editor User's Guide | 8 - AutoCAD and Microstation files in Template Editor | 112
Limitation Description
See also
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
AutoCAD and Microstation import errors in Template Editor (on page 112)
• Elliptic arc approximated by circular arc: "Elliptic arc(s) approximated by circular arc."
It may help to ungroup the object in the original file with a suitable editor and rearrange the objects.
Template Editor User's Guide | 8 - AutoCAD and Microstation files in Template Editor | 113
Tip:
Error messages are saved to the import.log file in the same folder as the tpled.exe application.
If you need assistance with resolving file import errors, contact your service representative.
See also
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
Limitations in AutoCAD and MicroStation file imports in Template Editor (on page 111)
1. Select the imported image, right-click and select Properties to open the Object Properties dialog
box.
To modify an individual shape of the group, you must first ungroup it.
Regroup the shapes when you are done modifying individual shapes.
See also
Importing AutoCAD and MicroStation files with import method defined in Template Editor (on page 108)
Template Editor User's Guide | 8 - AutoCAD and Microstation files in Template Editor | 114
Importing AutoCAD and MicroStation files with no import method defined in Template Editor (on page
110)
Limitations in AutoCAD and MicroStation file imports in Template Editor (on page 111)
Chapter 9. Template attributes and Template Editor
Template attributes represent object properties. You can use template attributes in value field formulas
and row rules to get the required data from the product database. At run-time, the product replaces the
attribute with the actual value of the corresponding object property.
For example, if you include the attribute WEIGHT in a report template, Tekla Structures displays the weight
of the model object in the report.
See also
Controlling row output with rules in Template Editor (on page 71)
3. Customizable comments, such as the tab name in the user-defined attributes dialog box
4. The name of the user-defined attribute, the same as in the objects.inp file.
See also
Adding comments to user-defined template attributes in Template Editor (on page 119)
Adding hierarchy to user-defined template attributes in Template Editor (on page 120)
3. Add MY_ATTRIBUTE to the list of attribute names and, define the settings as follows:
The attribute is shown in the attribute tree in Template Editor, under DRAWING > USERDEFINED:
See also
4. The comment you added is displayed in the attribute tree in Template Editor.
See also
Do the following:
example:
Notice the full stops after the brackets, and between the hierarchies.
4. Save the changes. The new hierarchy is shown in the attribute tree.
Template Editor User's Guide | 9 - Template attributes and Template Editor | 121
User-defined attributes are case sensitive. Ensure that you enter the attribute name using the correct case
for all characters.
See also
See also
Do the following:
1. Select and double-click the template, row, value field or graphical field to open the properties dialog
box.
2. Click the Free attributes button. The Free Attributes dialog box opens.
Template Editor User's Guide | 9 - Template attributes and Template Editor | 122
3. Add the attributes you want to apply to the selected element. You can add two types of attributes:
◦ To add a free attribute defined by your product, work on the Application tab, which is active
by default. Select an attribute name from the Name list.
◦ To create a new user-defined free attribute, select the User tab, and type a name for the
attribute in the Name field.
4. Depending on the attribute, you can select the value for the attribute from the Value list, or you may
have to type a value in the Value field.
5. Click Add to add a new attribute. The attribute appears in the Properties table of the tab. You can
add several attributes by repeating steps 3-5.
6. Click OK to save the changes, close the dialog box and return to the properties dialog box.
Once you click OK in the properties dialog box, Template Editor applies the free attributes you added to
the selected template, row, value field or graphical field.
See also
1. Select the template, row, value field or graphical field and double-click to open the properties dialog
box.
2. Click the Free attributes button to open the Free Attributes dialog box.
3. Depending on the free attribute you want to delete, select the User tab or the Application tab.
4. Select an attribute from the Properties table.
5. Click Delete.
6. Click OK.
Once you click OK in the properties dialog box, Template Editor removes the deleted free attribute from
the selected template, row, value field or graphical field.
See also
1. Select and double-click to open the properties dialog for the template, row, value field or graphical
field.
2. Select the User tab or the Application tab.
3. Select an attribute from the Properties table.
4. Depending on the attribute type, either select a value from the Value list or type it into the Value
field.
5. Click Modify to modify the existing attribute value. You can repeat steps 4-6 to make the needed
changes.
6. Click OK.
Once you click OK in the properties dialog box, Template Editor updates the modified free attribute value
to the selected template, row, value field or graphical field.
See also
Resizing value field fonts automatically in Template Editor (on page 86)
The global attributes definition file contains the list of available properties. Templates use field objects
for getting the data. Value fields get textual data, and graphical fields are area reservations for product-
specific graphics or texts. Each field refers to the product by using one or more global attributes.
Template Editor checks attribute names when formulas and rules are created and displayed to you as
they are checked. If no global attributes file is specified, then this check is skipped.
The definition file for global attributes is set in the File Locations preferences.
See also
Template Editor User's Guide | 10 - Template attributes and Template Editor | 124
Output options for templates created with Template Editor (on page 126)
1. Based on the content types and the global attributes used in the template, the product prepares
a list of identifiers. The list contains an id for all the objects that are to be processed. This phase
does not appear to the user.
2. The header and the optional page header are output.
3. The first object in the identifier list is chosen for processing.
◦ All rows in the template are output, and value field references to global attributes are
resolved using the first object. Each row appears as a line in the output template.
◦ If a row has a hierarchy the rows below it are processed before continuing to the next row.
◦ If a new page is needed, page headers and page footers are printed according to their
output settings.
See also
Output options for template headers and footers (on page 58)
Template Editor User's Guide | 10 - Using templates in Trimble products | 126
For more information on output options please refer to your product documentation.
Option Output
File output Screen output can also be saved to a file, for ex
ample an HTML or RTF file. The available file for
mats depend on the product.
See also
Get a single piece of data from the database in Template Editor (on page 93)
Creating a listing of template objects from the database (on page 94)
The image below shows a steel structure. A set of steel beams on the roof and along the wall are selected
for processing. The selected parts appear in green. The listing contains the type, count, length and weight
of selected beams, and the total weight of all the selected parts.
Part Description
Header The header at the top of the template prints the contract informa
tion and the title of the listing. It has the following template objects:
dashed lines (text objects), texts ("Mark", "Profile", etc. (text objects)
Template Editor User's Guide | 10 - Using templates in Trimble products | 128
Part Description
and data from the product: project number and name (value field ob
jects).
Row The row components define the listing of steel beams and has value
fields that get the type, count, length and weight of the selected ob
jects. Similar objects in the database are combined in the output by
default, but if you need to separate those objects, they can be output
as distinct rows.
Page footer The page footer contains a value field producing the total sum of
weights of all processed steel beams (value field) and the text "Total
for" and dashed lines (text objects).
The references to the product data are made by using global attributes in value fields.
See also
Part Description
After outputting template rows for the first main object (Cylinder 1), the output process continues to the
next main object (Cylinder 2) and to the first row of the template.
See also
Template Editor User's Guide | 10 - Using templates in Trimble products | 130
Creating a listing of template objects from the database (on page 94)
The output template is a map legend that can be inserted on a background map. The legend, for example,
contains the district name, scale and important dates.
Object Description
See also
b. Click a point to define the location of the field within the row.
The Select Attribute dialog box appears prompting you to select an attribute for the value
field.
Template Editor User's Guide | 10 - Using templates in Trimble products | 132
Include the extension .html.rpt in the file name. For example, Part_list.html.rpt.
d. Click OK.
See also
It helps if you are familiar with standard programming language features such as data typing and
conditional expressions. You can also use any ANSI C programming language guide to check the basic
concepts.
Adding comments to row rules and value field formulas in Template Editor (on page 134)
Conditional structure for row rules and formulas in Template Editor (on page 135)
See also
Controlling row output with rules in Template Editor (on page 71)
1. Select the value field or row and double-click to open the Value Field Properties or the Row
Properties dialog box.
2. Click the Formula button to open the Formula Contents dialog box or the Advanced button to open
the Rule Contents dialog box.
3. Modify the contents of the formula or rule and add the comments at the end of each line with the
following syntax: // <comment>
You can also insert comments in-line with the following syntax: /* <comment> */
See also
Offset for formula string functions is the position of a character within a string. Positions are numbered
from zero onwards. The first character in a string has an offset of 0, the second character in a string has
an offset of 1, etc.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 135
See also
You can create rules and formulas by modifying the structure and conditions of the if-else statement. The
example below is for a row rule.
See also
Controlling row output with rules in Template Editor (on page 71)
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 136
== Both sides are The following condition checks if the profile type is B.
equal
!= Sides are not This rule checks if the assembly position is not equal to the next value of
equal assembly position. If this is true, the row is output. If they are equal, the
condition is false, and printing the row is skipped.
< Left side is This rule finds all rows with the assembly position that is less than 10,
smaller anything equal to or greater than 10 is skipped.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 137
<= Left side is This rule outputs values with a LENGTH less than or equal to 30. If those
smaller or values are not found, they are skipped.
equal
> Right side is This rule outputs values with a LENGTH greater than 50, anything equal
smaller to or less than 50 is skipped.
>= Right side is This rule outputs values with a LENGTH equal to and greater than 30,
smaller or anything less than 30 is skipped.
equal
&& Logical AND, If D1 is 200 and D2 smaller than 40, the row is output, otherwise it is
both condi skipped.
tions must be
true
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 138
|| Logical OR, If D1 is 200 or D2 is smaller than 40, the row is output, otherwise it is
only one con skipped.
dition must be
true
See also
Conditional structure for row rules and formulas in Template Editor (on page 135)
To understand how control functions work, you must be familiar with the template output process.
Access control functions in the Rule Contents dialog box. Select functions from the Control list.
Some control functions can be used in formulas as well (IsFirst, IsLast, PageBreak). Access control
functions in the Formula Contents dialog box from the Control list.
IsFirst
This function checks if the row is the first one, and returns TRUE if it is. This function can be used in both
row rules and value field formulas.
This rule outputs the first row only and skips the rest. For each row, it checks, if the row is the first one. If
it is, the row is output, otherwise the row is stepped over.
See also
IsLast
This function checks if the row is the last one and returns TRUE if it is. This function can be used in both
row rules and value field formulas.
This rule outputs the last row only and skips the rest. For each row, it checks, if the row is the last one. If it
is, the row is output, otherwise the row is stepped over.
See also
Output
This function outputs the current row. Use this function when you want to output the row that fulfills the
condition you specify. The condition can evaluate, for example, the position of the row or the field values
on the row.
This rule outputs rows if the LENGTH attribute is greater than 50. If the LENGTH attribute is less than or
equal to 50, those rows are skipped.
You can also override the color of template objects with the Output function with the following syntax:
Output("#<key>=<color>;")
The following abbreviations are keys that refer to the template objects in question:
You can combine these values in one row rule using a semicolon as a separator. This rule overrides the
colors when the LENGTH attribute is longer than 1000, then value fields are orange, text objects are yellow
and the drawing color is blue (i.e. lines are blue).
See also
Overriding template object colors with row rules in Template Editor (on page 77)
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 141
PageBreak
This function inserts a page break. This function can be used in both row rules and value field formulas.
The following rule inserts a page break when the condition is true.
StepIn
Use this function when you want to process the rows that are located below the current row in the
hierarchy.
The following rule checks the value of a value field on the row. If the value is "B", the row is output,
otherwise the rows below in hierarchy are processed. If there are no rows below, the processing continues
with the next row on the same level.
StepOut
Use this function to stop processing the current row and rows below it in the hierarchy, and continue to
processing the row higher in the hierarchy. If no row higher in the hierarchy exists or if this was the last
row in the template, then the function starts processing again from the first row of the template.
The following rule checks if the row is the first one. If this is true, the row is output, otherwise the
processing continues to the row higher in the hierarchy.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 142
StepOver
Use this function when you want to ignore the current row and continue to the next row.
The rule outputs values less than or equal to 30. If those values are not found, they are skipped.
To select a parameter for an attribute function, click the Select button in the Attribute area of the dialog
box. It opens the hierarchical list of global attributes.
Parameters: The parameter must appear inside parentheses and double quotation marks (" ").
• a constant parameter CONTENTTYPE that returns the content type of the current row.
GetValue
Use this function when you want to return the value of the attribute on this output row, i.e. for the currently
processed object in the product database.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 143
In the following example, GetValue is used in a row rule condition to check if the current row has a desired
field value. The rule outputs the row only if the material is S235JR.
NextValue
Use this function when you want to get the value of the attribute on the next output row (not printed yet).
You can use this, for example, to inquire material types.
In the following example, NextValue is used in a row rule condition to inquire the material on the next row.
The rule outputs the current row only if the material on the next row is different. This is a way to avoid
outputting duplicate rows in a report.
PreviousValue
Use this function when you want to get the value of the attribute on the previous output row.
In the following example PreviousValue is used in a row rule condition to check the content type of the
previous row. The rule outputs the current row only if the previous content type is not PART. This is a way
to avoid outputting rows not relevant for PART types.
IsSet
Use this function when you want to check whether a value has been set for a user-defined free attribute.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 144
The following rule is an example of using IsSet in a row rule condition. The rule outputs the row only if a
user-defined "comment" attribute has been set.
In order to access the parameters of the function click Select in the Value Field area of the dialog box.
This opens the hierarchical list of value field names. The parameter must appear inside parentheses and
double quotation marks (" ").
Note:
Value field functions get values from all processed fields - from the duplicate lines that may have
been excluded from the output, and from invisible value fields.
GetFieldFormula
Use this function when you want to query the value of a given value field. You can also combine several
field formulas into one.
CopyField
This function is intended for copying summary fields from other locations in the hierarchy. CopyField
always copies the source value from other locations, even if the row is hidden.
• a row to a header
• a row to a footer
• a header to a row
• a footer to a row
• a Sum field
For a header, page headers, page footers or a footer, the function copies the value of the given value field
to itself.
If this function is used in row rules, it only copies the values from the row itself and not from other rows at
the same level in the hierarchy or rows lower in the hierarchy.
Note:
In this example, there is an ASSEMBLY row with two rows on a lower level. One of the lower rows is a
PART row and the other one is a SUMMARY row.
The SUMMARY row has a value field Summary_field containing the following formula:
The calculated weight is shown on the ASSEMBLY row in a value field with the following formula (and you
can hide the SUMMARY row):
See also
Hiding template rows from output in Template Editor (on page 70)
Case Scenario
2 CopyField searches for the source field in the same row hierar
chy above where it has been placed (i.e. from child row to par
ent row).
3 CopyField searches for the source field in the same row hier
archy below where it has been placed (i.e. from parent row to
child row).
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 147
Case Scenario
5 CopyField searches for the source field outside of the row hier
archy in the rows above where CopyField has been placed.
See also
Sum
Use this function when you want to calculate the intermediate sum of a numeric value field. The data type
is Number or Number with decimals. All proceeding values of the parameter before the current output
row are counted, and the sum is reset to zero every time after the row is output.
To calculate the total sum instead of the intermediate sum, use the Total function instead.
This formula calculates the intermediate sum of the value field WEIGHT_T and is multiplied with the total
value of the model.
See also
Total
Use this function when you want to total the sum of a numeric value field. All the processed values of the
value field are counted.
See also
Count
Use this function when you want to calculate the number of value fields that have been output before the
current output row. The count is reset after output.
To calculate the total number of value fields processed instead of this intermediate count, use the All
function instead.
This formula returns the intermediate count of value fields with the name Drawing_Name.
See also
All
Use this function when you want to calculate the number of value fields that have been output before the
current output row.
This formula calculates all the previously handled value fields named ValueField_1.
See also
You can access string functions in the Formula Contents dialog box and in the Rule Contents dialog box.
Select functions from the String list in the Operators area of the dialog box.
Before you get started ensure that the Data type is set to Text in the Value Field Properties dialog box.
find
This function returns the offset of a substring in a string.
Template Editor User's Guide | 11 - Template Editor formula and rule reference |
150
For example:
match
This function checks if the given two strings are the same and returns TRUE if they are, FALSE if they are
not.
The following formula uses the match function to check if the field value contains a "-" character.
You can also use the wildcard characters ? and * in formulas, for example, match ("aabc", "*b*")=TRUE
mid
This function returns n characters from a string, starting from the position that is given with the offset
parameter. If n is omitted, all succeeding characters are returned.
This example returns two characters from the string starting from the second character. The result is "bc".
length
This function returns the number of characters in a string.
Parameter: string
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 151
reverse
Use this operator to return the mirror image of the string.
Parameter: string
getat
This function returns the character in a given offset.
The following rule calculates the offset of the characters H, E and A, essentially filtering and searching for
PROFILEs that begin with HEA.
setat
Use this function to replace a character with another character at the given offset.
The following formula replaces "a" with "b" at the specified offset of 0. The result is "baa".
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 152
replace
This function replaces all specified substrings with another string.
For example:
This returns a string in which all of the space characters from the value returned by GetValue("PROFILE")
have been removed.
toupper
This function changes parameter string to all uppercase and returns the string.
Parameter: string
For example:
This returns the value of the NAME-attribute of the part in all uppercase letters, for example, COLUMN.
tolower
This function changes parameter string to all lowercase and returns the string.
Parameter: string
For example:
This returns the value of the NAME-attribute of the part in all lowercase letters, for example, column.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 153
fvf
Use this function to find a value in an external file.
The path for the file can be included in the filename parameter.
Template Editor supports several separators, so " ,\t" would make all the space, comma, tab and newline
characters separators.
The function gets the value 16 for the profile MET-202Z25 from the Overlap.dat file.
For more information related to the support for this function, consult the Tekla User Assistance topic,
"How to read data from a text file in Custom Components."
newline
This function inserts a new line in a formula. You can either select it from the list or add it manually by
typing \n.
For example:
Width: 100
Height: 27
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 154
join
This function joins a list of strings separated with a separator into one string and trims away the empty
strings.
Parameter: separator
For example:
If the CopyField functions return the values 7, 7, <nothing>, 10, the result is 7;7;10.
<nothing> in this example means that the HOLE_6 value field is not output because its row is stepped over
based on the row rule.
See also
join2
This function joins a list of strings separated with a separator into one string and retains the empty
strings.
Parameter: separator
For example:
If the CopyField functions return the values 7, 7, <nothing>, 10, the result is 7;7;;10.
<nothing> in this example means that the HOLE_6 value field is not output because its row is stepped over
based on the row rule.
See also
asc
This function returns a character code or an integer code, depending on how it is input.
If the parameter is a string it returns an integer representing the character code to the first letter in a
string.
You can access conversion functions in the Formula Contents dialog box and in the Rule Contents dialog
box.
Select functions from the Math list in the Operators area of the dialog box.
Note:
Note that string parameters must appear inside double quotation marks (" ") in the parameter list.
int
Parameter: value
This converts a double to an integer. If the attribute value is 3.5, the result is 3.
If rounding is required, use the round function. In this example, if the attribute value is 3.5, it is first
rounded to 4.0 and then the int function returns 4.
See also
double
This function is used to convert an attribute value to a double, a number with decimals.
Parameter: value
This formula converts a number expressed in a text string to double format. The result is 100.0000
string
This function is used to convert an attribute value to a string.
• MinDecimals - Minimum number of decimals (optional, effective only when converting double
values)
• MaxDecimals = Maximum number of decimals (optional, effective only when converting double
values), default = same as MinDecimals
This formula multiplies the LENGTH attribute value by 16, divides that by 25.4 and converts the result to a
string. The string contains a number with no decimals.
string(3.14, 1) = "3.1".
Parameters: value, unit string ("ft" = Feet, "in" = Inch, "m" = Meter, "cm" = Centimeter, "mm" = Millimeter,
"rad" = Radian, "deg" = Degree)
This formula converts 4.0 inches to a product unit. It returns 101.60 mm, if the length unit is set to mm
and decimals are set to 2 in the Value Field Properties dialog box.
This formula converts 2.0 radians to a product unit. It returns 114.59 degrees, if angle is set to degrees
and decimals are set to 2 in the Value Field Properties dialog box.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 158
format
This function converts an attribute value to a formatted information string that is product-specific. The
parameters available for the function are listed in the value field meanings definition file. Please refer to
your product documentation for information on the available formats and how to use them.
The result depends on the product-specific definitions for meaning string, unit string and precision.
Parameters: value, meaning string, unit string, precision string or number of decimals
This value field formula creates a formatted string using the LENGTH attribute value, the "Length"
meaning string, the "inch-frac" unit string and "1/8" precision.
The result depends on the product-specific definitions for meaning string, unit string and precision.
Operations cannot operate directly with attributes or value fields; instead, they accept attribute functions
and value field functions as parameters.
See also
Controlling row output with rules in Template Editor (on page 71)
For example:
• sin (d180)
• sin (g200)
You can access trigonometric functions in the Formula Contents dialog box and in the Rule Contents
dialog box.
Select functions from the Math list in the Operators area of the dialog box.
You can access statistical functions in the Formula Contents dialog box and in the Rule Contents dialog
box. Select functions from the Math list in the Operators area of the dialog box.
See also
ceil
Use this function when you want to round up a value to the next bigger integer.
Parameter: parameter
See also
floor
Use this function when you want to round down a value to the next smaller integer.
Parameter: parameter
This formula uses division to transform imperial units to feet and the floor function to round down the
result.
See also
min
This function calculates the minimum value of parameters.
Parameters: x, y, z,...
The following formula calculates the lowest number in the series in a report.
See also
max
Use this function to calculate the maximum value of parameters.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 163
Parameters: x, y, z,...
The following formula returns the biggest scale used in drawing views (SCALE1 - 5). As the value is
string 1:20 for example, you need to convert the numbers following ":" to integer format before the max
comparison.
See also
sqsum
This function calculates the sum of squares.
Parameters: x, y, z,...
The following formula adds the square of 60 plus the square of 70, which prints 8500 in a report.
ave
This function calculates the average of parameters.
Parameters: x, y, z,...
sqave
This function calculates the average of the squared parameters.
Template Editor User's Guide | 11 - Template Editor formula and rule reference |
164
Parameters: x, y, z,...
The following formula calculates the sum of squares. The report prints 2646.
You can access them in the Formula Contents dialog box and in the Rule Contents dialog box. Select
functions from the Math list in the Operators area of the dialog box.
fabs
This function calculates the absolute value of a number.
Parameter: number
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 165
The following formula calculates the local center of gravity from the start point with fabs giving the
absolute number. For example, the absolute value of -3.54 is 3.54.
exp
This function calculates the involution of e, to a specified power. e is Euler's number.
Parameter: power
The following formula calculates the involution of e to the power of two, which equals 7.389056 in a
report.
ln
This function returns the natural logarithm of the parameter (base number e).
Parameter: number
The following formula calculates the natural logarithm of 5, which prints 1,60944 in a report.
log
This function returns the logarithm of the parameter (base number 10)
Parameter: number
The following formula calculates the logarithm of the number in the brackets. The report prints the final
calculation of 0,698970. The length of the printed number (with decimals) is determined in the Value Field
Properties dialog box in the Length field.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 166
sqrt
This function calculates the square root of a number.
Parameter: number
The following formula acts as a filter to calculate the distance between the start and end points, where
sqrt calculates the square root and pow calculates the involution.
mod
This function calculates modulo, the remainder after division.
pow
This function calculates the involution of a value.
This formula calculates the distance between the start and end points, where sqrt calculates the square
root and pow calculates the involution.
Template Editor User's Guide | 11 - Template Editor formula and rule reference | 167
hypot
This function calculates the hypotenuse of a triangle.
n!
This function calculates the factorial of a number.
Parameter: number
The following formula calculates the factorial of 4. This translates to 4x3x2x1 and a report would display
the result, 24.
round
This function rounds off a number according to given accuracy.
This formula rounds the number to two decimals, which is specified in the formula (0.01). The report
prints 13.65.
and
This is a binary operation (and similar to & in the C language).
or
This is a binary operation (and similar to | in the C language).
Trimble and certain product names are registered trademarks of Trimble Inc. in the United States, the
European Union and other countries and may have similar statutory protections. Trademarks of third
parties are not mentioned in this Manual to suggest an affiliation with or endorsement by their owners.
Elements of the software described in this Manual may be the subject of pending patent applications in
the European Union and/or other countries.
Trimble Technology kits and tools are property of Trimble Finland Oy.
Index
A 159
acos Attribute functions
159 142
Adding GetValue
hierarchy to user-defined template attributes 142
120 IsSet
Adding a value field 143
79 NextValue
Adding comments to formulas 143
134 PreviousValue
Adding comments to rules 143
134 Attributes
Adding free attributes user-defined
121 116
Adding logos to template AutoCAD file imports
100 error messages
Adding pictures 112
99 limitations
Adding symbols to template 111
99 AutoCAD files
Adding user-defined template attributes 108
118 fill type import settings
Aligning template objects 110
56 font import settings
Aligning value field texts 110
88 importing
Arithmetic operators 108, 110
158 modifying
asin 113
159 C
Assigning value field meanings Calculating hypotenuse
85 167
atan Changing symbol file
159 104
atan2 Changing symbols
170
104 47
Changing template component type Conditional structure
50 135
Color map Content Browser
24 18
Column settings hide template objects
fill direction 61
67 Content types
fill policy 65
67 for rows
modifying 68
70 Continuous action
multiple columns 59
70 Control functions
number of columns 138
67 IsFirst
space between columns 139
67 IsLast
starting point 139
67 Output
Combining lines with the same information 140
78 PageBreak
Commenting 141
user-defined template attributes StepIn
119 141
Comparison operators StepOut
136 141
Components StepOver
changing the type 142
50 Conversion attributes
cut, copy, paste 24
46 Conversion colors
inserting a page footer 24
44 Conversion fonts
inserting a page header 24
44 CopyField
modifying properties 145
171
reference cases 157
146 Data types for value fields
Copying value field values 84
145 Defining template output
cos formulas
159 89
cosh Definition file for row contents
159 24
Creating a formula Definition files
89 16
Creating a pre-defined template Deleting a pre-defined template
35 35
Creating a row rule Deleting free attributes
72 122
Creating a value field Drawing a polyline
79 40
Creating HTML reports Drawing objects
131 setting visibility
Creating material listings 42
94 snapping lines
Creating row rules 59
creating with Rule Wizard use grid
73 60
Creating rows Drawing operations
64 59
D Drawing with numeric pad
Data type conversion functions 60
155 Duplicate lines
double 78
156 Duplicate objects
format 46
158 E
int Extending template objects
156 52
string F
156 File Location preferences
vwu (value with unit) setting symbol directories
172
106 creating
File Locations preferences 89
modifying data type conversion functions
25 155
Files logical operators
in templates 136
15 mathematical operations
Fill import map 158
24 offset
Filtering object selection 134
61 properties
Filtering rows from output 90
70 saving
Find values in external file 89
153 statistical functions
Finding text 161
63 Formulas and rules
Fitting template in window attribute functions
21 142
Font properties binary operations
for template objects 168
62 misc. functions
Fonts 164
resizing Free attributes
86 121
Formula Contents properties adding
90 121
Formulas deleting
133 122
adding comments modifying
134 123
arithmetic operators G
158 Global attributes
comparison operators 123
136 Global attributes definition file
conditional structure 24
135 Graphical fields
173
inserting Importing AutoCAD and MicroStation files
41 108, 110
setting visibility Inserting a graphical field
42 41
Graphical objects Inserting a value field
offset 79
134 Inserting template components
Graphical templates 39
13 Inserting template objects
Grid 39
activating Inserting text object
26 41
aligning template objects Interface components
26, 56 workarea
drawing template objects 17
60 K
showing or hiding Keep aspect ratio
27 48, 100, 102, 108
Grid settings Keyboard shortcuts
density 29
27 L
Grouped objects Logical operators
errors during import 136
112 Logo
Grouping template objects adding to template
50 100
H M
Headers and footers Main features
output options customize output
58 12
Hiding the gird Material listings
27 127
Hiding value fields from output creating
87 94
HTML reports MicroStation file imports
131 limitations
I 111
174
MicroStation files sqrt, square root
108 166
fill type import settings Modifying a formula
110 92
font import settings Modifying AutoCAD and MicroStation files
110 113
import errors Modifying file locations preferences
112 25
importing Modifying free attributes
108, 110 123
modifying Modifying row rules
113 76
Misc. mathematical functions Modifying value field properties
164 80
Miscellaneous functions Moving template components
and 49
167 Moving template objects
exp 51
165 O
fabs Object properties
164 attributes
hypot 115
167 Objects
ln, logarithm cut, copy, paste
165 46
log, logarithm duplicating
165 46
mod, modulo modifying properties
166 47
n!, factorial Offset
167 134
or Output options for templates
168 126
pow Outputting a template
166 125
round P
167 Panning
175
20 24
Partially pick objects general
45 21
Pens and colors workarea
32 23
Picking multiple objects R
45 Restoring original view
Picture libraries 21
98 Rotating symbols
Picture properties 55
102 Rotating template objects
Pictures 55
98 Rotating text objects
adding to template 55
99 Rotating value fields
assigning rules 55
105 Row hierarchy
setting paths modify
106 71
Polyline Row output
drawing combine rows
40 69
Pop-up menus distinct rows
31 69
Pre-defined rules Row rules
78 creating
Pre-defined templates 72
35 modifying
Presentation files 76
24 overriding template object colors
Presentations 77
in templates properties
32 74
Preview pane saving
18 78
Program preferences storing rules
file locations 72
176
Rows 74
14, 64 Rule wizard
content types 73
65 Rules
controlling output with rules 133
138 adding comments
creating 134
64 arithmetic operators
filtering 158
142 comparison operators
filtering output 136
140 conditional structure
getting values of previous row 135
143 data type conversion functions
hide from output 155
70 for pictures
ignoring rows in output 105
141 for symbols
inquiring next output 104
143 logical operators
inquiring output 136
139, 139 mathematical operations
modifying content type 158
68 properties
modifying hierarchy 74
71 row output
modifying sort type 71
69 statistical functions
output properties 161
65 S
outputting sub-rows Saving a pre-defined template
141 35
rules Searching for text
71 63
user-defined free attributes Selecting objects
143 using toolbar
Rule Contents properties 61
177
with a filter Setting value field meanings
61 24
Selecting template components Setting work directory for Template Editor
45 24
Selecting template objects Showing the grid
45 27
Selection toolbar sin
61 159
Setting a directory sinh
definition files 159
25 Snapping line objects
Setting drawing object visibility 59
42 Sorting order
Setting file for pre-defined rules value field output
24 83
Setting folder(s) for fonts Special drawing operations
24 59
Setting folder(s) for pictures Statistical functions
24 161
Setting folder(s) for symbols ave
24 163
Setting graphical field visibility ceil
42 161
Setting grid density floor
27 162
Setting pens and colors in Template Editor max
32 162
Setting picture file paths min
106 162
Setting properties for objects sqave
54 163
Setting row output properties sqsum
65 163
Setting symbol file paths Status bar
106 32
Setting text visibility Storing a rule
42 72
178
String operations changing
149 104
asc Symbol libraries
155 98
find Symbols
149 98
fvf adding to template
153 99
getat assigning rules
151 104
join changing
154 104
join2 in templates
154 15
length modifying
150 106
match modifying symbol files
150 103
mid rotating
150 55
newline setting paths
153 106
replace symbol properties
152 100
reverse viewing symbol files
151 103
setat T
151 tan
tolower 159
152 tanh
toupper 159
152 Tekla fonts
Summing information in value fields 62
95 Tekla Structures
Symbol Editor advanced options for value fields
106 97
Symbol files language string in Template Editor
179
96 31
Template attributes preview pane
115 18
adding setting up interface
118 21
Template components start with command line
14, 39 28
changing name status bar
48 32
cropping toolbars
49 17
inserting into template user interface
39 17
modifying size workarea
48 17
moving workarea preferences
49 23
selecting Template Editor components
45 39
Template definition files Template Editor interface
16 modify components
Template definitions 19
34 Template Editor objects
Template Editor 39
about Template field objects
12 Graphical fields
file locations preferences 15
24 Value fields
general preferences 15
21 Template footers
grid 14
26 Template grid
interface overview 26
17 Template headers
keyboard shortcuts 14
29 Template objects
pop-up menus 15, 39
180
aligning 61
56 Template output
aligning to grid creating reports
56 131
changing name customize
48 12
extending duplicate lines
52 78
font properties forcing a page break
62 141
formatting with painter hierarchical listings
53 128
grouping map labels
50 130
inserting into templates material listings
39 127
modifying size Template page
48 modifying properties
moving 37
51 Template page footers
overriding colors with row rules 14
77 Template page headers
rotating 14
55 Template rows
selecting 14, 64
45 creating a rule
setting default properties 72
54 creating a rule with Rule Wizard
text properties 73
53 pre-defined rules
trimming 78
52 rules for rows
trimming location 71
56 saving a rule
ungrouping 72
50 Template shapes
view or hide 15
181
Template type Text in templates
modifying 15
38 Text objects
Template windows 53
19 inserting
Templates 41
34 rotating
changing type 55
38 setting visibility
closing 42
36 Text properties
creating 53
34 Textual templates
creating pre-defined 13
35 Tips
deleting pre-defined template components
35 57
graphical templates Template Editor interface
13 28
opening template objects
36 57
output options value fields
126 96
output process Toolbars
125 17, 32
outputting Tooltips
125 32
page properties Trigonometric functions
37 159
reports and labels Trimming template object location
125 56
saving Trimming template objects
34 52
saving pre-defined TrueType fonts
35 62
textual templates U
13 Ungrouping template objects
182
50 147
User-defined attributes Value field meanings
116 83, 85, 88
User-defined template attributes Value field properties
adding comments 80
119 Value fields
adding hierarchy 79
120 aligning texts in output
Using format painter for objects 88
53 assigning meanings
Using presentations 85
in templates creating
32 79
Using row rules to change template objects formatting during output
colors 88
77 formatting output
V 83
Value field attributes gather data
resizing fonts automatically 93
86 hiding from output
Value field formulas 87
89 language strings
conditional structure 96
135 modifying output properties
modifying 80
92 out a blank field
Value field functions 96
144 resizing fonts
All 86
148 rotating
Count 55
148 setting data type
GetFieldFormula 84
145 setting layout
Sum 86
147 setting priority
Total 84
183
setting query on other fields
145
setting sort order
83
sorting priority
84
summary fields
95
TS advanced options
97
zero value in value field
96
Z
Zooming
20
184