How to create a User Interface - Part 3

Tekla Tedds
Tekla Tedds for Word
Not version-specific
Tekla Tedds Tekla Tedds for Word
Environment
Not environment-specific
This is the third part of a step-by-step guide showing you how to use the Tedds Interface Designer to create user interfaces for your own custom calculations. In this part, you will enhance the user interface created in part 2 by allowing the user to specify the properties of the steel section by choosing a standard section from a Tedds Data List.
This guide is written for Word 2007/2010 some of the steps described may be slightly different if you are using an older version of Word.

Data Lists

Data Lists allow the user to make a selection from a predefined list for which one or more associated variables are then written to the current document. To show a Data List you can use a button in your user interface that when clicked will evaluate the appropriate Tedds expression.

Enhancing the user interface

Your user interface currently requires the user to enter three values for the steel section, A, rxx and ryy. You will now add a button that when clicked will show a Data List of standard steel sections which the user can then select from.

 

  1. Open the document created in part 2 and start editing the user interface.
  2. Add a new Button control to the begining of the Steel section group.
  3. Change the Name property to Section...
  4. In the Control Properties list click on the Command property and then click on the [...] button to open the Command Builder.
The Command Builder automatically creates expressions for showing Tedds Data Lists, Data Tables and Data Graphs or for calculating library items. When creating an expression to show a DataList you can either select the Data List file from the list provided or you can use the Variable option and specify the name of an existing Tedds variable. The drop list control for the variable option includes the pre-defined system variables for commonly used data list files, some of which are listed in the table below:

 

Variable Description
steel_section_dlist Steel sections for British Standard design
steel_section_dlist_euro_si Steel sections for Eurocode design
au_steel_section_dlist Steel sections for Australian design
ca_steel_section_dlist Steel sections for Canadian design
steel_section_dlist_us_asd Steel sections for US design
Note that the actual data list file name stored in each variable will vary depending on the regional version of Tedds you are using. For example the British standard datalist would be Euro.dls in the UK but Perwaja_Euro.dls in Asia.

 

  1. Select the Variable option.
  2. In the drop list select the Data List variable most appropriate for your region.

 

To ensure that the users selection is remembered each time a document is re-calculated you also need to specify the names of the variables that will be used to store the current page and current item that have been selected in the Data List.
  1. In the Page variable text box enter "sectionPage", including the quotes.
  2. In the Selection variable text box, enter "sectionItem", including the quotes.
Close the user interface, return your changes to the document and then re-calculate the document.
 
Image
Image1.png
 
You should now see the improvement to the user interface, click the Section... button and the Data List will be shown from which you can make a selection. Also notice that once you've made a selection the edit boxes for the A, rxx and ryy automatically update with the selected values.

Summary

You've now updated your Tedds user interface so that it is even easier to use. Instead of the user having to enter three separate values for the steel section, they can now make a single selection from the list of standard steel sections available. You can find out more about creating your own user interfaces by searching for "Interface Designer" using the search.
Was this helpful?