Add variables to a custom component

Tekla Structures
2021
Tekla Structures

Add variables to a custom component

Variables are the properties of a custom component. You can create variables in the custom component editor and use them to adapt custom components to changes in the model. Some of the variables appear in the custom component's dialog box, while others are hidden and are only used in calculations.

Variable types

There are two types of variables:

  • Distance variable: The distance between two planes, or between a point and a plane. A distance variable binds parts together, or works as a reference distance.

  • Parametric variable: Controls all the other properties in a custom component, such as name, material grade, and bolt size. Parametric variables are also used in calculations.

Distance variables

Use distance variables to bind custom component objects to a plane, so that the component objects stay at a fixed distance even if the surrounding objects change. You can create distance variables manually or automatically.

You can bind the following objects to a plane:

  • construction planes

  • reference points of parts (only custom component objects)

  • reference points of bolt groups

  • chamfers

  • part and polygon cut handles

  • line cuts

  • reference points of reinforcing bars

  • reference points of reinforcement meshes and strands

  • fittings

You can decide which distance variables are shown in the custom component's dialog box. Show the variables if you want to edit their values in the dialog box. Hide the variables if you only use them to bind objects to a plane.

Parametric variables

Use parametric variables to set properties for any object the custom component creates. After creating the variable, you will be able to change the value directly in the custom component's dialog box.

You can also create formulas to calculate values. For example, you can calculate the position of a stiffener relative to the beam length.

You can decide which parametric variables are shown in the custom component's dialog box. Show the variables if you want to edit their values in the dialog box. Hide the variables if you only use them in calculations.

Note:

There are some limitations concerning the variable names.

  • To be able to correctly reference a variable in your formula, the variable name must be 19 characters or shorter. Variables with longer names will not work correctly when referenced.

  • Variable names cannot contain mathematical operators (+,-,*,/).

  • You cannot use a mathematical constant, such as PI or e, as a variable name.

Was this helpful?
Föregående
Nästa