Enhancing calculations (Australian design example)
There is even more functionality available for our calculations than we have seen so far. Whether you use these enhancements depends both on the purpose of the calculation, and on the time you have available. Certainly these features are very useful when you are writing calculations which others will use (as we do at Trimble). Hence the Tedds library is packed with examples which use these features, and you have already seen many of them when running our calculations.
In this exercise we will enhance the previous calculation and you will see what we are talking about.
Allow about 15 minutes to complete this exercise.
Buttons used in this exercise
Tedds Input Fields
The Tedds Input Field speeds up the editing and often the creating of input variables. We will replace all the existing variable definitions in the calculation:
Tedds Show Fields
The final thing we would like the calculation to do is automatically assess our section and report in the document whether our chosen section is passing or failing and, if it is failing, why. We use a Tedds Show Field to do this.
-
Enter the following two
paragraphs after your existing calculations:
- These last two values help us assess the utilisation of the section for the two checks. Assigning them to output variables will help us with creating Tedds Show Fields. Calculate your document once you have written them to ensure they are working properly before proceeding.
- Place your cursor beneath these paragraphs and click the Insert Tedds Field button.
- Select the Show tab. The Show Field we want to create will test whether the section is failing stress and output a message to give the status of the check.
-
Select the Condition type
option and input the following information:
- The output of the Tedds Show Field consists of two text messages known as output strings. Only one output string is displayed in the document depending on the status of the condition.
- Check your input carefully, then click OK to enter the Tedds Show Field in the document.
-
When you have OK'd the
input, click the Field Codes button to view the resulting Tedds Show Field.
It should be as shown below. If your Tedds Show Field is incorrect, the best
thing to do at this stage is to delete it and run through the Insert Tedds
Field dialog again.
Using logic In Tedds
Take a close look at this Tedds Show field, and you can see how we use a simple logic statement to output one of two pieces of text using the if logical operator.
if(check_stress > 1, “Section fails stress check” , “Section OK for stress”)
The general form of this logic expression is as follows:
if(condition, true_output, false_output)
For example:
a = if(b > c, 10, 20) = ?
Check table of Logic Functions in the Mathematics topic for full details.
-
Now calculate your document
to calculate the Tedds Show Field. You should find you have something
similar to the following in your Progress Log and you will also see the
output text on the page where you placed the Tedds Show Field.
- Change some of your input values and re-calculate a few times to test your full calculation and both the pass and fail output of the Tedds Show Field.
Tedds Data List Fields
In the previous exercise we inserted a Data List Field into the calculation using the Engineering Data button. However, it could have been inserted more easily using the Tedds Field button:
-
With the Field Codes
button on you will see the following Tedds Data List Field:
- Delete the entire definition of this field from your page. Leave your cursor on the empty line.
- Click the Tedds Field button.
- Select the Data List option and scroll down to select the same .dls file name as that shown in the line you just deleted above.
- Input the Prompt as Select Section.
- To input the Default page and Default item click the ellipsis button ( ) and then select the page and section size that you want to appear as the default.
- Accept the defaults for other options and click OK when you have everything entered.
- Calculate your document to run it once more.
What next?
Congratulations! You have completed the final exercise in the guide and are ready to begin using Tedds to its full potential.
Here are a few things you could try next:
- Create another Tedds Show Field similar to that above for the slenderness
check - following is the logic statement you would use for this:
Condition check_slender > 1
- Create a Tedds Show Field to give the overall status of the section,
checking both slenderness and stress. Try the following:
Condition check_slender > 1
Yes PASS No Section fails! - Take a look at Tedds Message Fields. The input for these is the same as Tedds Show Fields but their output is displayed in a Message box, rather than in the document. You will see examples of their use in the Tedds Engineering Library Calculations.
- Try creating Messages using the Value of Variable option to show the values of the minimum area and radius of gyration in the Log before the Data List is displayed.
Of course there's much more for you to discover. We wish you an enjoyable and productive time in using the program in your day-to-day work, and exploring its capabilities more fully.
If you would like to read up on further information about Tedds, then we recommend the Tedds Help system, which you can access in the usual way.
Some Tedds dialogs have context sensitive help. To see this simply click the Help button in the dialog.
We also run training courses in most locales, for further information on availability contact the Tedds support team in your region, simply click the Support icon in any of Tedds’ automated calculations.