This
example shows how to create a parametric variable that replaces a sub-component with another
one in a nested custom component.
As a prerequisite, you need to have a nested
custom component that includes a sub-component (in this case My
connection). Replace the sub-component with another sub-component (My connection 2).
-
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 a new parametric
variable, click Add.
-
Modify the parametric variable
as follows:
-
From the Value type list, select Component name.
Tekla Structures automatically adds the suffix _name to the
variable name. Do not delete the suffix.
-
In the Formula box, enter the name of sub-component you want to replace, in this
case My connection.
-
In the Label in dialog box box, enter a suitable name for the label which will be visible in the
custom component dialog, for example, New
connection.
-
Link the parametric variable to the Name property of the sub-component:
-
In the Custom component browser, browse for the Name property of the
sub-component.
-
Right-click Name and select Add equation.
-
Enter P1_name after the equal sign, and press
Enter.
-
Save the custom component.
-
Close the custom component editor.
-
Select the custom component in the model, and open the custom component
dialog.
The option to change the sub-component is
visible in the custom component's dialog.

-
To change the sub-component, click the … button next to
the name box.
-
In the Applications & components catalog, select the My connection 2
sub-component. It will replace the My
connection in the custom component.
-
In the custom component dialog,
click Modify.
Tekla Structures
changes the sub-component in the nested custom component.