Writing Tedds calculations - stage 2 (Australian design example)

Tekla Tedds
2021
Tekla Tedds Tekla Tedds for Word

Writing Tedds calculations - stage 2 (Australian design example)

In this exercise we will investigate the use of math and data functions to build on the stage 1 calculation, extending its capabilities and introducing some more Tedds features.

Allow about 30 minutes to complete this exercise.

Buttons used in this exercise

The new commands you will be introduced to in this exercise are located on the Library and Show/Hide groups of the Tedds tab as shown below:

Defining input variables

Here are the new calculations we will add to the document you created in exercise 2 in order to check the adequacy of an actual section.

  1. Type the first two paragraphs, which are just text, below the existing calculation.
  2. Type the third paragraph and note that here we are defining three input variables which are properties of the section we are checking. Ensure you separate the text and all the expressions using delimiters (;) as shown.

Tedds math functions

  1. Now type the fourth paragraph. Note how the Tedds math function min is used here.
    Note: A math function is always followed directly by its argument(s) in parentheses as shown here. There are many more such functions available in Tedds for Word. For full details of this and other functions, consult the Mathematical functions topic, or refer to the Writing your own custom calculations Index item in the Library Access System, where all functions are completely documented.
  2. Now type the fifth paragraph - this is a simple expression that determines and displays the actual stress in the section and assigns the result to the variable fa

Result accuracy and formats

It is sufficient to display the slenderness to one decimal place. To do this we use a format string to override the default result setting of three decimal places.

  1. Now type the last paragraph of the new calculations as follows. Use the Greek text button as you did on page 32 for the variable name λ.
  2. The characters f1 following the ? are the format string. The format string must immediately follow the ? with no space in between as shown. See below for a fuller explanation.
  3. Once you have finished typing this last expression, check the new paragraphs carefully. Have you included all the delimiters? Have you used subscripts correctly? Have you used the correct case for variable names and units?
  4. When you are satisfied that everything is correct, click the Calculate All button. A math function is always followed directly by its argument(s) in parentheses as shown here. There are many more such functions available in Tedds for Word. For full details of this and other functions, consult the Tedds Help system topic Mathematics, or refer to the Writing your own custom calculations Index item in the Library Access System, where all functions are completely documented.
  5. If you have an Error, then Interrupt and see Errors and troubleshooting. Fix any errors until your calculation works fully.
  6. Review your results and look at the last paragraph to see how the format string we used has operated:
  7. Click the Variables button to examine the list of saved variables and check the stored value for this variable:
Result Format Strings Explained

You can override the default result setting, and reduce or increase the number of decimal places for a displayed result, by using a result format string after the ? result field. For example typing ?f2 will display the result to two decimal places. It is important that there is no space between the format string and the ?. The format string characters signify the following:

f = fixed format, and 2 = result to be displayed to 2 decimal places (can be from 0-15)

Note that format strings only control the precision of the result displayed in the document, not any result that is stored by Tedds.

For full details of this and other result formats, consult the topic Result formats and precision.

Using data functions in calculations

The calculation as written is very useful, but we can enhance it further. One big improvement is to include a Data List in the calculation, making the properties of a huge number of section types and sizes instantly available.

  1. First edit the two paragraphs underneath the heading Check Section; as follows:
  2. Delete the following text for the section name - Try a 150 Parallel Flanged Channel. Leave an empty line here.
  3. Next delete just the values for the properties of the section. Replace them with a ? result field. You should end up with the following:
  4. Finally, place your cursor as shown at the very end of the heading.

Retrieving Data Lists from the library

  1. Click the button to Launch the Tedds Engineering Data
  2. This opens a special Set in the Library where all the Data Lists and Data Tables are accessed. There is a lot of data in this set. We wish to find a Data List that includes steel properties suitable for this calculation. We will use the Find facility to help us locate such a table.
  3. Each item in the set has both a short and a long name, we are going to find by the short name, so ensure View/Long Names is unchecked before continuing.
  4. Now select the Group we want to search in - Australian Standards.
  5. Select Edit/ Find in the library, and type in AS 4100 as shown.
  6. Library Access System finds the AS 4100 group which contains the data lists which are appropriate for AS 4100 design, click the plus sign to the left of this group. Pick the Steel sections data list (AU) item which is also highlighted above.
  7. Now to bring this item into your calculation, either double click the item, or click the Execute… button. You should find the following has been entered in your document.
  8. This text inserted is a Tedds Data List Field which launches the specified Data List (further details on Tedds Fields are given below),
  9. Close the library once you have retrieved the Tedds Data List Field.
  10. Now click Calculate All to calculate the document again.
  11. The Data List will now be displayed when the Tedds Data List Field is calculated:
  12. Select the 150 channel section then click on the Details button to examine the variables defined in the table.
    Note: Note that we have used exactly the same names for the properties in our calculation as those defined by the Data List - A, rx and ry. This is the key to integrating all Data Functions with your calculations. Remember that variable names are case-sensitive.
  13. Click the Select button to return these variables to your calculations - you will see that the section's properties from the Data List replace the ? fields in your document and the Tedds Field displays the choice you made in the Data List.
  14. The Data List is now integrated with your calculation. Re-calculate a few times, each time changing your selection of channel size in the Data List, to test this.
  15. Click the Variables button and you will see that all the variables defined by the Data List are listed and are thus available to be used in calculations.
  16. Save the calculation at this stage, as we will build on it in the final exercise.
    Note: Whilst in this exercise the Data List was inserted into the calculation via the Tedds Engineering Data button, it could have been inserted via the Tedds Field button instead. The use of Tedds Fields is covered in the next exercise Enhancing Calculations.

Tedds fields

  1. Check the Field Codes box.
  2. Look at the Tedds Field in your document and you will see the following:
  3. The command that runs the Data List is now revealed. Uncheck the Field Codes box again to return to the normal view of the document.
Tedds Fields Explained

Field Codes enable you to see and thus edit the hidden commands which are Tedds Fields. These commands run special functions in Tedds like the Data Lists. We will see some more Tedds Fields shortly. A Tedds Field will run when it is calculated, like any normal expression. We hide the Tedds field, since you would not want it to appear in a printed report. The Field Codes button reveals the Tedds Fields. Tedds Fields should be treated like expressions, and separated from text and other expressions in the same paragraph using semi-colons.

What next?

Congratulations! You have completed the fourth exercise and learned everything you really need to write powerful Tedds calculations. Maybe now would be the time to have a go at writing a calculation of your own. It's a good idea to start with something simple and build on the complexity as you become more familiar with Tedds.

The next step in the guide, Enhancing Calculations is about making Tedds calculations still easier to work with, and is especially relevant if you envisage writing calculations for others to use. Even if your calculations are for your own use you may find these further features beneficial so we recommend that you review them. You might like to leave this step until you have had a go at writing a calculation of your own using what you have learned so far.

Was this helpful?
Previous
Next