Define variables

Tekla Tedds
Modified: 20 Sep 2023
2025
Tekla Tedds Tekla Tedds for Word

Define variables

You define all variables in the same way whether you are defining variables for a calc section or for a document. After you have created a variable and assigned a value to the variable, you can use it throughout your calculations in the same calc section or document. To create variables, see the following instructions.

Note:

The following only applies to Tedds for Word.

Variables can be equal to:
  • A value

    For example x = 45 or Z = 245 N/mm2

  • A string

    For example text = "This is a string of text."

  • The result of an expression

    For example C = A + B

Variable naming rules

Variable names must follow some simple rules. They must:

  • Only contain alphanumeric characters (A-Z, a-z, 0-9), Greek characters, underscores (_), and full stops (.).

    Note:
    • Variable names are case-sensitive.

      For example, Area and area are two separate variables.

    • Variable names take subscripts into account.

      For example, Aeff and Aeff are two separate variables.

  • Not be longer than 32 characters.

  • Not start with a number.

  • Not be the same as a Tedds function name (for example sin or median).

  • Not contain superscript characters.

  • Not contain any formatting other than subscripts.

    Note: When a part of a variable name is in subscript, the part can contain spaces and a list separator (, or ;).

Assign a value to a variable

  1. Type the variable name and an equal sign.
  2. After the equal sign, type the desired value, expression, or string.

    For example:

    a = 45

  3. Calculate the expression.

    The variable is now stored in the variable list, and you can use it in later calculations.

Assign a unit to a variable

  1. After the variable value, place a space. Then, type the desired unit.

    For example:

    a = 45 m

  2. Calculate the expression.

    The variable is now stored in the variable list with its unit, and you can use it in later calculations.

Was this helpful?
Previous
Next