Writing Tedds calculations - stage 1 (US design example)

Tekla Tedds
2021
Tekla Tedds Tekla Tedds for Word

Writing Tedds calculations - stage 1 (US design example)

Having looked at using calculations from the Tedds Library we can move on to look at one of the most exciting and powerful features of Tedds - the ability to create your own calculations. This is where an initial investment of time can give you huge returns later. Once you have invested time writing a calculation, you can use it over and over again, you can also update calculations in an instant, making further great savings. You can also customize and extend the Library of Tedds calculations to match the calculations that you use most frequently in your office.

In this exercise we will see that writing Tedds calculations simply uses the math and logic conventions with which you are already conversant. We start by looking briefly at very simple examples introducing the basics of calculating with Tedds for Word. We then create a “real-world” example, covering the main features of writing effective calculations in depth.

Allow about 30 minutes to complete this exercise.

Running Tedds for Word

To write calculations you need to use Tedds for Word.

  1. Launch Tedds from the icon on your desktop.
  2. Click the option to run Tedds for Word - Microsoft Word will now open with Tedds integrated. If this is the first time you've run Tedds for Word a Release Notes document and the Library Access System will open too.
    Note: It is important to realize that you are looking at Microsoft® Word with the Tedds capabilities added. We only add to the functionality of Word, so you can do anything you would normally do in Word. Treat a Tedds Calculation Document just like you would any ordinary Word document. You can type reports, import files and text, embed spreadsheets and so on. And of course you can add calculations to your reports; either straight out of the Tedds Engineering Library, just as you did in the previous exercise, or create your own.

The Tedds interface

The commands you will need to use in this exercise can all be found on the Tedds Tab of the ribbon as highlighted below:

You will find a Word Document open, which looks very similar to the Tedds output document.

The document Header can be edited in a similar manner to that in Tedds by clicking the Edit Header button - this button is highlighted above.

In this exercise two documents will be required, so open a new blank one by selecting File/ New Tedds Document
Now we are ready to begin writing our first calculation in Tedds.

The basics

Writing calculations in Tedds for Word is easy. Tedds follows standard mathematical rules and uses standard mathematical operators. For example 1 + 2 would add 1 to 2. To write an equation use the = sign, and to specify where you want to see the answer use the ? symbol. For example:

1 + 2 = ?

Type the above anywhere in your document. When you calculate this equation the ? will be replaced with the answer.

Calculating in Tedds for Word

To calculate equations in Tedds for Word you can use one of several Commands:

All - this will calculate the whole document.
Calc Section - this will calculate the Calc. Section your cursor is in.
Selection - this will calculate only equations you have highlighted.
  1. In the Calculate ribbon group, click All to calculate your equation:

    1 + 2 = 3.000

  2. You should find the answer displayed in your document as shown above. if you have an error, take a look at the Errors and troubleshooting section below.

Units in Tedds

Tedds automatically takes units into account, so you don’t need to apply conversion factors to get the right answer. Tedds will also check that the units you are using are dimensionally correct and warn you if they aren’t.

  1. Type the following in your document using the same case as you see here:

    890 mm + 1 ft + 8.5 in = ? m

  2. In the Calculate ribbon group, click All to calculate this equation:

    890 mm + 1 ft + 8.5 in = 1.411 m

  3. You should find the answer displayed in your document as shown above. if you have an error, take a look at the Errors and troubleshooting section below.

Defining and using input variables in Tedds

Defining variables is the key to writing effective Tedds calculations. We will use the following calculations to demonstrate this. Do not type this yet - we will show you how to enter the calculation below (in stages).
  1. Close the current document, (because two documents were opened at the beginning of the exercise you should still have an empty one displayed).
  2. Type in the following two paragraphs in the empty document.

    The first paragraph is just a title for our calculation. The second paragraph is a standard Variable Definition which uses a superscript in its units.

  3. Once you have finished typing, read the notes in the box below for an explanation of a standard variable definition, and to check you have typed it correctly.
    The Standard Variable Definition Explained
    Note the following:
    • The expression defines the variable's unique name, current value and units.
    • Variable names are case sensitive, cannot contain spaces or be function names (like sin for example). Other than that you can use pretty much anything you like as you can see, including Greek text and Subscripts.
    • The semi-colon is important. It is a delimiter that separates an expression from text, or another expression in the same paragraph. If you omit delimiters in either of these cases, then you will get an error when you calculate your document.
    • The equality sign '=' defines an expression. Without it no calculation will be performed.
    • Spaces and Tabs are not significant in this, or any other, expression. Use as many or as few as you wish to make your calculations look presentable and easy to read.
    • We will look at Units in more detail shortly but, for now, note that they are also case sensitive and have a correct syntax, that you must use (as shown above).
  4. Now enter the following paragraph which uses this variable:
  5. Use the Insert multiplication symbol button to enter the × mathematical operator - do not use a lower-case x.
  6. Check the notes in the box below for a detailed explanation of the components of this paragraph.
    Mathematical Expressions Explained
    Note the following:
    • The same observations as before apply to delimiters, explanations, spaces and units.
    • You cannot omit math operators in expressions: Tedds cannot calculate 0.6Fy, you must type the expression as shown above, including the × .
    • The result field ? is used to tell Tedds where the result should be output - when calculated the ? will be replaced with the result of the expression.
    • The value of the result will be in the result unit you specify. Ensure this has the correct form and dimensions. Do not omit this.
    • The expression contains a variable (Fy) that is defined in the calculations before (that is above) the point where it is used. Expressions should not contain variables that are not yet defined.
    • The expression contains two equalities and performs two functions:
      • calculates and displays the value we wish to know - the result.
      • assigns this result to a variable named - Fa
    • It is not obligatory to always do this. You can write a valid expression to perform just one of these functions by either omitting the variable name and the first equality, or the second equality and the ? and unit.
  7. In the Calculate ribbon group, click All.
  8. Your expression has been calculated and the result has replaced the ? as before. if you have an error, take a look at the Errors and troubleshooting section below.
  9. Here are the next two paragraphs of the calculation. The first paragraph is a standard variable definition, while the second uses both T and Fa to determine the minimum section area and creates a variable AMIN with this value.
  10. Type the first paragraph, then follow the steps below to enter the second.
  11. The second paragraph contains examples of the use of Subscript (often used for name suffixes) and Superscript (used for powers).
  12. To type the variable name AMIN, first type the A, then click the Subscript button.
  13. Now type MIN, then click the button again to return to normal text.
  14. To type the unit in2, first type in, then click the Superscript button.
  15. Now type 2, then click the button again to return to normal text.
  16. Click Calculate All to calculate these expressions once you have entered them.
  17. You should find the result displayed in the document - if you have an error, take a look at the Errors and troubleshooting section below.
  18. Here are the final three paragraphs of the calculation. Follow the steps below to create these.
  19. Here we define two new variables to be used in the expression in the final paragraph.
  20. Type the first paragraph, entering the subscript for the name Le as you did before.
  21. Follow the steps below to enter the second paragraph.
  22. Use the Greek text button to enter the name λL
  23. First click the button indicated, then type the Roman equivalent of the Greek letter – (l in this case for lambda).
  24. Now click the button again to return to normal text, then enter the subscript suffix as you did above using the Subscript button.
    Note: A much easier way of entering Greek characters and more complex units is to use the Tedds Greek Characters, Tedds SI Units and Tedds US Units toolbars which can be selected from the Tedds Tab on the ribbon.
  25. Use Copy and Paste to enter this name in the final expression.
  26. Now click Calculate All to calculate these final expressions:
  27. You should find the result displayed in the document - if you have an error, take a look at the Errors and troubleshooting section below.

Storing variables in Tedds

  1. Click the Variables button.
  2. The Variables dialog box will open, displaying the stored values.
  3. You will note that we do not just store the variable name and value, but also the dimensions. This is how Tedds handles all the unit conversions for you.
    Note: You can Delete variables from this list if you wish:
  4. Cancel from this dialog, and edit one of the values on the page - say the tie force to T = 150 kips. Now check back in the stored variables and you will note the stored value has not changed.
  5. Re-calculate the document and check back in the list of variables - the new value has now been stored.
    Note: An important observation — the stored value of a variable only changes when you re-calculate the definition, not when you just edit it on the page. If you edit the value of a variable you must re-calculate the variable definition, and any calculations that use it to update them.

More about units in Tedds

  1. Change the tie force back to its original value T = 100 kips. Calculate again to store this new value.
  2. Look again at the values displayed in the Variables dialog box. You will note that many of these values are not those displayed in the document.
  3. The values in the dialog are in the Base Units in which Tedds performs all calculations and from which all the other units are derived. The base units are shown in the following table:
    Tedds Base Units
    Metric
    Length m
    Mass kg
    Time s
    Temp °C
    Note: If you hover over a variable name in the Variables dialog box a summary list is displayed showing the value of the variable in all applicable standard units.
  4. Note that our calculation does not include any conversion factors.
    Note: Tedds’ unit handling is a massive help – Tedds comes with a huge number of defined units and you can add more if needed.

    Dimensional Checking - Tedds checks all dimensions in your calculation and will inform you if these are incorrect. This is why you should use units consistently throughout your calculations. Do so, and you can have total confidence that your calculations are dimensionally correct.

  5. Save the document and give it a name - call it “Exercise 2” - as we wish to build on it later in the guide.

To complete this exercise, in the next section we will take a brief look at handling errors in calculations.

Errors and troubleshooting

The problem with a lot of guides is they only show you the right way to do things, and then you have no idea what to do when something goes wrong! Let's look at a couple of errors and how to fix them.

  • If you have an error in your calculations, Tedds will inform you when you calculate your document and the error is encountered. The first thing you should do is Interrupt the calculation process.
  • If you have jumped to this section because you have encountered an error previously, then click the Interrupt button in the dialog (see step 11 below), review the details and then return to fix the error in your calculations and continue with the exercise.

If your previous calculations were error free, then you will have had no need to look at this section. We shall therefore create some calculations which do have errors so that we can see how to handle them.

  1. Open a new blank document for this example.
  2. Click the Tedds options button (on the More menu).
  3. The Options dialog box will open, click on the Calculating / General page.
  4. Make sure that the options above are checked and then click OK. We can now proceed to create some calculations with errors.
  5. Enter the following 2 paragraphs as they appear here - see if you can spot any errors as you do, but don’t fix them yet!
  6. Now click the Calculate All button to calculate the calculations - you should see the Expression Error dialog:
    Expression Error dialog Explained

    This is the specific error.

    This line is the one that Tedds cannot evaluate, so look here to spot the error.

    This is an explanation of the error, together with some typical causes.

    This is the button you should generally click,

  7. Tedds flags the first error, and gives you some help in fixing it.
  8. When you are ready, click the Interrupt button. Tedds highlights the error for you in the document as shown below: Once we fix the problem and re-calculate, this error message will automatically disappear.
  9. Check the rule about delimiters (see The Standard Variable Definition Explained info box earlier in this topic). There should be a semi-colon between the expressions to separate them. Add this in and re-calculate the entire document.
  10. Now we will get the next error – the variable WD is not defined. We have typed WD instead of wD and variable names are case-sensitive.
  11. Click the Interrupt button to stop the calculation.
  12. Correct the variable name on the page to wD and re-calculate. The calculations should now complete with no problems. Tedds automatically deletes all error messages from the page.

What next?

Congratulations! You have completed your first Tedds calculation. You can now begin writing effective calculations in Tedds for Word. There are more great features that make such calculations even more powerful, and we will show you these later.

Now we are going to look at using calculations from the Engineering Library in Tedds for Word: Using Library Calculations in Tedds for Word

Was this helpful?
Previous
Next