Set object properties by using parametric variables
Use parametric variables to set basic properties (such as name, material, profile, position numberidentifier that is assigned to all similar parts, assemblies, cast units, or reinforcement
Position number consists of a prefix, separator, and running number. The prefix is part of the position number, identifying a numbering series. The running number is part of the position number, and is the assigned number in the numbering series, based on the start number. The separator is an optional character, such as a slash, that separates the prefix and the running number.
In Tekla Structures, the position numbers assigned in the numbering are shown in marks and templates, for example.
In the US, the term piece mark or ship mark is used to refer to a position number.
, and so on) for any object the custom componentcomponent that the user creates and uses for creating model objects whose composition the user can modify as a group
creates. Parametric variables automatically get the prefix P (parameter), which is shown in the Variables dialog box.
The following example shows how to create a variable that sets all welds in a custom component to a given size. After creating the variable, you are able to change the weld size directly in the custom component's dialog box.
- 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.
- 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.
- In the Name box, enter a name for the variable.
You can also use the default name, such as P1. In this example, enter Weldsize as the name of the variable.
- In the Value type list, select a suitable value type.
The type determines what kind of values can be used with this variable. In this example, select Length, which is suitable for lengths and distances.
- In the Formula box, enter a value or variable formula.
Leave this box empty.
- In the Label in dialog box box, enter a descriptive name for the parametric variable.
This label will be shown in the custom component's dialog box. In this example, enter Weld size as the label.
- In the Visibility list, define whether the variable will be visible in the custom component's dialog box.
Hide the variable if you only use it in calculations. Show the variable if you want to be able to edit the value in the custom component's dialog box. In this example, select Show.
- Click Close.
You have now created a parametric variable with the following settings:
- In the Custom component browser, link the variable to the desired object propertysingle characteristic associated with an object type
For example, profile and material are object properties.
- Select the property.
Select the Size above line property of the uppermost weld.
- Right-click the property and select Add Equation.
- After the equal sign, enter the name of the parametric variable.
Enter Weldsize here.
You can now modify the Size above line property by using the Weld size box in the custom component's dialog box.
- Select the property.
- Repeat step 9 for any other property of the same type, if needed.
Repeat the procedure for the other welds as well, so that they will all be linked to the Weld size box in the custom component's dialog box.
- Save the custom component.
The variable is now displayed in the custom component's dialog box, unless you set the visibility of the variable to Hide in step 7.
If you change the weld size value now, the size of all welds within the custom component will change accordingly.