This
example shows how to create a parametric variable that modifies a sub-component in a nested
custom component on the basis of a component attribute file.
In this example you will use the value types
Component name and Component attribute file, which work together. Use Component name for replacing a sub-component inside a custom component with another
sub-component, and Component attribute file for selecting a different property file for the sub-component.
Component name and Component attribute file follow a fixed naming format: Px_name and
Px_attrfile. Do not change the fixed name.
To show values for these in
the custom component's dialog, x must be the same for both,
for example, P2_name and P2_attrfile.
-
In the model, select the custom
component, right-click, and then select Edit custom component.
-
On
the Custom component editor toolbar, click the Display variables
button.
The Variables dialog opens.
-
To create two new parametric variables, click Add twice.
-
Modify the first parametric variable as follows:
-
From the Value type list, select Component name.
Tekla Structures automatically adds the suffix _name
to the name of the variables. Do not delete the suffix.
-
In the Label in dialog box box, enter New component.
-
Modify the second parametric variable as follows:
-
From
the Value type list, select Component attribute file.
Tekla Structures automatically adds the suffix
_attrfile to the name of the variable. Do not delete the
suffix.
-
In the Name box, change the prefix of the second variable so that the prefixes
for the two variables are the same.
In this example, the
prefix is P1.
Note:
The component name and component attribute file variables must
always have the same prefix, otherwise they do not work.
-
In the Label in dialog box box, enter Property file.
-
Link the parametric variables to the Name and Attribute file properties of the nested component:
-
In the Custom component browser, browse for the Name and Attribute file properties of the bolt group.
-
Right-click Name and select Add equation.
-
Enter
P1_name after the equal sign, and then press
Enter.
-
Right-click Attribute file and select Add equation.
-
Enter
P1_attrfile after the equals sign, and then press
Enter.
-
Save the custom component.
-
Close the custom component editor.
-
In the model, select the custom
component, and open the custom component dialog.
-
To change the sub-component,
click the … button next to the name box.
-
In the Applications & components catalog, select a suitable sub-component.
-
To change the property file, click the … button next to
the name box.
-
In the Attribute file list dialog, select a different attribute file.
You can now change the sub-component and
its property file directly from the custom component's dialog.

-
In the custom component dialog,
click Modify.
Tekla Structures
changes the sub-component and its attribute file in the nested custom
component.