Writing Tedds Calculations - Training Manual
Writing Tedds Calculations - Training Manual
Training manual
Disclaimer
This Software Manual has been developed for use with the referenced Software. Use of the Software, and use of this
Software Manual are governed by a License Agreement. Among other provisions, the License Agreement sets certain
warranties for the Software and this Manual, disclaims other warranties, limits recoverable damages, defines
permitted uses of the Software, and determines whether you are an authorized user of the Software. All information
set forth in this manual is provided with the warranty set forth in the License Agreement. Please refer to the License
Agreement for important obligations and applicable limitations and restrictions on your rights. Trimble does not
guarantee that the text is free of technical inaccuracies or typographical errors. Trimble reserves the right to make
changes and additions to this manual due to changes in the software or otherwise.
In addition, this Software Manual is protected by copyright law and by international treaties. Unauthorized
reproduction, display, modification, or distribution of this Manual, or any portion of it, may result in severe civil and
criminal penalties, and will be prosecuted to the full extent permitted by law.
Tekla, Tekla Structures, Tekla BIMsight, BIMsight, Tekla Civil, Tedds, Solve, Fastrak and Orion and are either registered
trademarks or trademarks of Trimble Solutions Corporation in the European Union, the United States, and/or other
countries. More about Trimble Solutions trademarks: http://www.tekla.com/tekla- trademarks. Trimble is a
registered trademark or trademark of Trimble Navigation Limited in the European Union, in the United States and/or
other countries. More about Trimble trademarks: http://www.trimble.com/trademarks.aspx. Other product and
company names mentioned in this Manual are or may be trademarks of their respective owners. By referring to a
third party product or brand, Trimble does not intend to suggest an affiliation with or endorsement by such third
party and disclaims any such affiliation or endorsement, except where otherwise expressly stated.
To see all the third party licenses, go to Tekla Structures, click Help --> About and click the Third party licenses button.
The elements of the software described in this Manual are protected by several patents and possibly pending patent
applications in the United Stated and/or other countries. For more information go to page
http://www.tekla.com/tekla-patents.
Table of Contents
Typographical conventions ...................................................................................................................... 5
Note boxes ............................................................................................................................................... 5
1.3 Applying Calc Writing to Predefine Variables and Link Calculations ......................................................... 13
1.3.1 Predefining Variables ............................................................................................................................... 13
1.3.2 Recalculating the Document .................................................................................................................... 14
1.3.3 Variable Hierarchy .................................................................................................................................... 14
1.3.4 Modifying the Predefined Variables ........................................................................................................ 15
Header 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 titles, 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.
Note boxes
You should always read very important notes and warnings, like
this one. They will help you avoid making serious mistakes, or
wasting your time.
LESSON
1
Writing calculations in Tedds for Word is straightforward and is very similar to how you would write
them by hand.
You can use the same math symbols that we’re accustomed to: + * / ×( ) < >
You can also use common math functions: max, min, sum, abs, sin, cos, if etc. and raise a variable
to a power using superscripts
Spaces and tabs are ignored so they can be used to layout calculations.
Lines of text and multiple equations in the same paragraph must be separated by a semi-colon (;).
– This is known in Tedds as a Delimiter.
– The end of a paragraph is also treated as a delimiter and is defined by pressing ‘enter’ on your
keyboard
Dead load; PDL = 350 plf
Live load; PLL = 600 plf
Factored load; Wu = 1.2 x PDL + 1.6 x PLL = ?F3 klf
Tedds Units
Tedds for Word can handle units and perform dimensional analysis on your equations. When
performing calculations it uses a set of internal system units, known as Base Units.
Converts all values and units into its base units using a comprehensive database.
Stores this converted value.
Performs all calculations in these base units.
Stores any values derived by these calculations in these base units.
Converts its base units into the units required for a final result field.
Outputs the converted result using the correct format and precision.
Store variables as a value – Define variables by specifying the name and value
wDL = 175 plf
wLL = 300 plf
Store variables as an expression – Variable name must start with $ you can then assign an
expression to the variable
$wDL = DL x Ltrib
$wLL = LL x Ltrib
Tedds follows standard mathematical rules and uses standard mathematical operators, so equations
can be written and calculated very easily.
You must calculate the document or the expression to store the variable and update expressions
Stored variables can be used in subsequent calculations
Wu = 1.2 x wDL + 1.6 x wLL = ?F3 ksf
Always indicate the result unit or values will be displayed in base units
Within an expression, multiplication and division are calculated first and hold the same importance,
they are calculated in order. Addition and subtraction are calculated second. Use parenthesis to
ensure the correct order of operations.
Parts of an equation:
Delimiter Variable Name Equality Result Field
Delimiter
Moment at midspan ; Mu = w * L2 / 8 = ? kip_ft
Formatting Results
You can set a results format and precision as you type the equation. Do this by typing a format
character and a precision number following the result field symbol (?).
Format Character
w * L2 / 8 = ?F3
Precision Number
Format Example
F - Fixed format 8396 = ?F3 = 8396.000 (decimal)
S - Scientific format 8396 = ?S3 = 8.396x103 (decimal)
G - General format 8396 = ?G3 = 8396 (decimal)
E - Engineering format 8396 = ?E3 = 8.40x103 (Significant Figures)
Multiplication symbol
Error messages are displayed if an equation is calculated that doesn’t follow the rules previously
discussed.
Continue or interrupt will display the errors where they occur in the document in red text.
Error messages indicate the type of error, location of problem and displays suggestions for
solutions.
Common errors:
Invalid Expression This message can represent several different errors relating to the
inability of Tedds to calculate the expression. Examples include a
missing semi-colon, a missing question mark or math symbol, or
incorrect use of Greek, subscript or superscript formatted text.
Specified result units do not Indicates the result’s units do not match the dimensions of calculation in
match dimensions of expression the equation. For example a length value added to a length value does
not equal a force.
Undefined variable Indicates a variable in the expression has not been previously defined in
the variables list and so Tedds does not know what value to use. It could
be that the variable has been defined in the document but has not been
calculated or the variable name has been written differently in the
expression to how it was originally defined.
Error examples:
Missing semi-colon
The calc writing basics can be used with the built-in library of calculations to input design data and
predefine variables.
You need to know the variable names in the calculation to predefine the values.
Run the Tedds library calculation that you want to predefine variables for to determine the
variable names.
– The variable names have to be exact.
– One ‘Calc Section’ cannot use variable values from another Calc Section.
– Every ‘Calc Section’ can use document variables.
– Define the document variable before any Calc Section
– Calculate the document before adding any Calc Sections to make sure there are no errors.
– Add the Library calculation to the document making sure to add a Calc Section when adding
the calculation. When the calculation
New
Calc Section
After calculating the document, the predefined variable values will now be stored in the Calc
Section.
Tedds looks first in the Calc Section variables list for values;
– The user interface assigns the values of the variables and has now stored them as a calc
section variable.
– Since these variables are now defined if the document variables are changed when
recalculating, this will not update the variable values in the Calc Section.
When Tedds for Word is calculating a Calc Section, it will not use the variables defined in any other
Calc Sections.
To find the value of a variable Tedds will look for the value in the following order.
– First in the Calculation Section
– Second in the document variables list.
– Third in the system variables list.
– If the variable hasn’t been defined in any of the above locations, then it is Undefined
depending on your Tedds settings
– You will either be prompted to enter a value or you will be shown an undefined variable error
message.
If a Calc Section defines a variable, it will no longer look to the document variables when you
recalculate the document
– This is the case for any variables defined in a User Interface
– This is not the case for a variable that is used only in an expression
Correct way to predefine variables in a user interface:
– Define a unique name to the document variable
– In the Calc Section, set the section variable name equal to the document variable name
A workaround to keep the values linked to the document variables is to use different names when
predefining variables.
Make sure your predefined variable names do not occur anywhere else in document.
Additional equations also need to be added at the start of the Calc Section, BEFORE the Tedds
library calculation.
The additional calculations will copy the values from the predefined variables to those variables
used by the calculation each and every time the Calc Section is calculated.
You can then change the values of the predefined variables at the start of the document and all
subsequent Calc Sections will be able to use the modified values.
Predefined
variables
Results from one calculation can be used in subsequent calculations by linking the Calc Sections. Since
variables are kept separate in their own Calc Sections they need to be manipulated in order to
accomplish this.
One way to transfer information between Calc Sections is to promote a section variable to a document
variable. All Calc Sections have access to the Document Section allowing all subsequent calc sections
in the document to use this variable.
The calculations are now properly linked. You can make changes to the document variables,
recalculate the document and those changes will be reflected in the subsequent calculations.
LESSON
2
Introduction to functions
Creating a dynamic table
Introduction to and working with Tedds Fields
Any function can be used directly in Tedds expressions. These can be mathematical functions or
specific Tedds functions.
There are several Tedds functions that will help transfer information between built-in calculations and
in calculation writing.
The main use of logic functions is to create conditional statements to refine a calculation and perform
an advanced check.
Logic functions are used in many code based design manuals and you can use them in your
calculations in the same manner
Familiar functions include: And, Equal, Greater Than, and many more…
The basic formatting for writing out a function in Tedds includes the following:
function(value1, value2, valuen) = ?
One of the most common logic functions is the if statement; this is an advanced logic function.
– In its simplest form, the basic make-up of an if statement contains a condition with possible
results:
If(condition,x,y) = ?
If “condition” is met then the value of “x” will be returned
If “condition” is not met then the value of “y” will be returned
Logic functions can be expanded to check several different conditions, this is most commonly done
with the if statement.
Additional forms of “statements” allow you to further refine the calculation and check different
conditions
– The if(and()) statement can be used to check if two simultaneous conditions are met
If(and (condition A, condition B), x, y) = ?
If both conditions A and B are true, then the value of “x” will be returned
If neither condition is true then the value of “y” will be returned
– the ifelseif() statement allows you to check two different conditions and return a result
depending on which condition, if any, is satisfied.
Ifelseif(condition A, x, condition B, y, z)
If condition A is met then the value of “x” will be returned
If not, check condition B. If condition B is met then the value of “y” will be returned
If neither condition is true then the value of “z” will be returned
PromoteVariable(“variable name”) = ?
Promotes variable from Calc Section to document, this is an alternative to the variable manager.
It is most useful if you are planning on publishing your calculation
GetSectionVar(sectionID,”variable name”,default) = ?
Returns the value of the calc section variable from a different section into the current section
This is useful for creating dynamic summary tables
A default value can be used if no value exists in the specified section
GetVar(“variable name”,default) = ?
Returns the value of a variable in the current calc section or a document variable
A default value can be defined if the variable doesn’t yet exist
This is useful when creating a user interface
VarExists(“variable name”) = ?
There are several other variable functions available in Tedds. We encourage you to explore them
within the program and contact the support department with any questions.
Promoting Variables
In the example from session 1 we can use a function to promote the snow load calculation pf instead
of using the Variables Manager.
You can type out the command at the end of the
calculation
Start with a semi-colon before the function to
separate the library calculation from the added calc.
The variable is promoted during the calculation and can be viewed in the document list after the
calculation is run.
Tedds for Word has specialized fields to enhance the look of a calculation and make it easier for other
people to use it.
There are many types of fields including:
Input Fields Creates a dialog box for inputting a variable value
Data Fields Includes data lists, data tables and data graphs
Output Fields Includes message, log and show fields
Calc Item Field Inserts saved calculations into a document
Excel Field Links with Microsoft Excel
All Tedds fields are inserted by using the Tedds Field command in the Tedds Ribbon.
The fields will be inserted into the document wherever the cursor is located when the Tedds Field
command is used.
Once the Input field has been inserted, a line of text will appear in the document
This text will look quite similar to the line of text already in the document that is being replaced by
this field
Semi-colons will appear at the start and end of the newly inserted text to show the start and end
of the field
Instead of displaying the numerical value previously entered into the document, the input field
displays a ‘?F0’
When the document is calculated the input box will be displayed based on the settings established for
the field.
Based on the input settings the dialog box will be blank, have a default value, or display the
previously defined value.
This can either be confirmed, by clicking OK, or changed by typing into the dialog.
Tedds has built-in data lists and tables that make it easy for you to input a large amount of data into
your document. An example of a data list is the steel section size selection table in the built-in Beam
and Column calculations. An example of a data table is the one used in the seismic loading calculation
to determine the lateral force resisting system with corresponding factors.
Data list fields are inserted by using the Tedds Field command and going to the Data List tab.
The fields will be inserted into the document wherever the cursor is located when the Tedds Field
command is used.
A single semi-colon will appear in the document to show where the field has been inserted.
Depending on the output options selected for the Tedds field, once calculated the result will display
the section size that was selected. The data list must be calculated for the associated variables to be
stored in the Variable Manager.
All variables associated with the selection you make will be stored in that documents appropriate
variable list.
These variables can then be used in the same way as any other variables that you have defined.
Key values from the data list’s selection could be displayed by typing them into the document.
Alternatively, the variable manager could be used to write out these variables into the document.
The information will be placed in the document wherever the cursor is located.
Values that are output are just values and will not be linked to the variable.
– In order to have the value updated with the section selection, replace the value with a
question mark.
Output fields are created the same way as Input Fields. The best way is using the Tedds Field
command in the ribbon. There are three kinds of output fields:
Message Fields Displays a message during the calculation in a dialog box. The information given must be
acknowledged before the calculation can proceed. No text is returned to the document
except a semi-colon representing the Tedds field.
Log Fields Displays the information in the progress log instead of a separate dialog box. The
information does not need to be acknowledged. No text is returned to the document
except a semi-colon representing the Tedds field.
Show Fields Displays information in the document once the file has been calculated.
All output fields will have four options for the type of field to be created; this controls the type of
information given by the field.
The purpose of Message Fields is to display information and require that the user confirm the message.
Calculate
Log Fields display messages in the progress log as the document is being calculated. You can use the
progress log to keep track of where the calculation is in the document and also to display messages to
help with the input process.
Show fields can be used in lieu of message fields when you need the information to be output directly
to the document.
Once the Show Field is calculated the information will be visible in the output.
Show fields are commonly used with conditional statements to display Pass/Fail messages.
LESSON
3
The Tedds to Excel link allows you to link your Tedds calculations with Microsoft Excel spreadsheets.
The link allows you to make the most out of both of these programs.
This is done by transferring data from Tedds for Word to Excel and from Excel back to Tedds for
Word.
The Tedds to Excel link requires at least Microsoft Excel 2000.
Create charts and tables in Excel and send them back to Tedds for Word.
Use Microsoft Excel to
– Create charts and graphs
– Analyze large amounts of data
– Run macros
Use Microsoft Word to
– Write calculations
– Create reports
– Run Tedds modules
In order for the Tedds Field to work properly you have to setup both documents in a way that allows
them to communicate this information.
Every variable value intended to be sent to Excel must be defined in full in the Tedds for Word
document, following the same basic calc writing rules as before.
Beam Length; L = 20 ft
Tributary Width; tw = 6 ft
Every variable value intended to be sent from Excel to the Tedds for Word document should also
have their variable names defined in the Tedds for Word document, with “= ?”
– This tells Tedds where to put the variable values in the Tedds for Word document, after it has
been calculated.
Moment; M = ? kip_ft
This sheet will contain two tables where the variables and values to be shared between Tedds and
Excel must be defined
The variables from/to Tedds must be put in their appropriate columns
The variable names must be written in expression text.
There are also some Guidance Notes given on this worksheet to help fill in the tables
– The notes show how to write in subscript, superscript and a few Greek characters
– A full list of text characters can be found in Tedds help
The template spreadsheet with a blank link sheet can be found locally on your computer:
C:\ProgramData\Tekla\Structural\Tedds\Excel
To properly link the variables, you must put the variables’ name and unit in the
correct columns
Variables from Tedds states which variables are taken from the Tedds
for Word document to Excel
Variables back to Tedds states which variables will be sent from Excel back
to Tedds for Word
The variables that are calculated in the Excel file need to be linked to their
Value cell being sent back to Tedds.
Set the cells in the Value column of the Variables back to Tedds equal to
their calculated cells in the Excel sheet.
Here the moment variable M being sent back to Tedds in cell G4 is equal to
the moment calculated in the Moment Calc sheet, cell C11
Filename The Excel spreadsheet that the Tedds for Word document will be
linking
Link Sheet The name of the new worksheet that will be created in the spreadsheet
to allow the Excel Link to work.
Insert Example Link Sheet Into Inserts an example in the Link Sheet to help set up the actual links
Workbook required.
Output Picture Allows you to send back to the Tedds for Word a Chart or a Table Range
Link variables from Tedds to Excel Allows variable values to be sent from Tedds for Word to Excel
Link variables from Excel to Tedds Allows variable values to be sent from Excel to Tedds for Word. Only
variables being transferred should be checked on under Options
Show Excel If selected the Excel spreadsheet will be displayed as the Tedds for
Word document is calculated. The Excel spreadsheet does not need to
be open when calculating the Tedds for Word document
Save workbook when linking is If selected the spreadsheet will be automatically saved once the
finished document has finished calculating. If this option is not selected the
Excel spreadsheet will not be saved and the cells will not have the
values from the Tedds document.