Hello!

Did you know that logged in users can see a lot more content?

Create a variable formula

Last updated June 24, 2019 by Tekla User Assistance tekla.documentation@trimble.com

Software version: 
2019

Create a variable formula

Create a variable formula

Use variable formulas to add more intelligence to your custom components. Variable formulas always begin with the equal sign ( = ). At its simplest, a formularule stated in a mathematical language

Formula is part of an equation.

can be a simple dependency between two variables, stating that P2 equals half of P1 ( P2=P1/2 ), for example. To create more complex calculations, you can use functions and operators inside the formula. For example, you can add mathematical expressions, if statements, references to object propertiesproperties associated with an object type

Usually a single object property includes a default value that the user can modify.

, and so on.

In the following example, we will create a formula that sets the weld size to half the thickness of the secondary part(1) part that exists in a building object and that is connected to the main part

(1) Secondary part can be an assembly secondary part or a cast unit secondary part.

(2) input part that the user selects after selecting the component main part when creating a component

(2) A component can have none, one or more component secondary parts.

flange. When the component is used in a model, Tekla Structures will use the thickness of the secondary part flange to calculate the size of the weld.

  1. In the custom component editortool that is used for modifying component that is created by a custom component, and for creating dependencies between component objects and other model objects

    , click the Display variables button.

    The Variables dialog box opens.

  2. Click Add to create a new parametric variablevariable used to define a value for a parametric property

    A parametric variable does not include a dependency.

    For example, name, material grade, and bolt size are parametric variables.

    .
  3. In the Name box, enter a name for the variable.

    In our example, we will enter w as the name of the variable.

  4. In the Custom component browser , go to Input objects > Secondary parts > Part > Profile properties.
  5. Right-click Flange thickness 1 and select Copy reference.

  6. In the Formula box, type = , right-click, and select Paste.

    Tekla Structures pastes the reference to flange thickness from the clipboard.

  7. After the flange thickness formula, enter *0.5.

    The formula should now read:

    =fP(Flange thickness 1,"GUID")*0.5

  8. Set the other values as follows:
    1. In the Value type list, select Length.
    2. In the Visibility list, select Hide.

  9. In the Custom component browser , go to Component objects > Weld > General properties.
  10. Right-click Size above line , select Add equation and type = w.

Quick feedback

The feedback you give here is not visible to other users. We use your comments to improve our content.
We use this to prevent automated spam submissions.
Content rating: 
No votes yet