Example: Create Parts with Connection Parameters - Step 11
Step 11: Apply variables
In the last step we would like to make the bore diameter changeable. The easiest way of doing that would consist in the adding of a diameter variable both for the asbestos cement panel and the T-beam, and apply the diameter of the bores to this variable. The variable could then be set for the sub-structure as well as for the element installation. However, this solution would have two disadvantages:
- To change the diameter of the bores, the variables need to be changed separately for the sub-structure and for the T-beam.
- All bores in one beam would have the same diameter - even if you may want to use different asbestos cement panels with different bore diameters.
To prevent these disadvantages, you have the option to transfer variables from one part to another part of the connection. Here we would like to do this with the bore diameters, so that they only need to be configured on the asbestos cement panel. Of course, we could also do this "the other way round", i.e. parameterize the bores on the sub-structure.
- Apply the part variable diameter with the value
15
to the assembly Asbestos cement panel.
- Change the Feature log entries in the Asbestos cement panel by changing the diameter for the
diameter
variable.
- Double-click on the Connection parameters Feature of the Asbestos cement panel.
- In the Variables area, click the left button to enter a new variable in the list. Enter Name:
through
and Value:diameter
. Confirm with OK.
- As a result of this change, HiCAD will, in addition to the intersection point coordinates, also transfer the value of the diameter variable of the asbestos cement panel as a variable called through.
- Now, change the T-beam. Here, too, edit the bore features of the beam and change the value for the diameter. Here, however, the value is
conn[1].through
for the bores referring to the first intersection point, andconn[2].through
for the bores referring to the second intersection point. Here, though, HiCAD will refuse this formula, since the variable do not exist. As a workaround solution, we therefore edit the part variants of the assembly and add the structure temporarily and manually. One variable calledconn
of the Type: List, in which two variables of the Type: Structure are contained, each with one variable calledthrough
with an arbitrary value. The diameters of the bores can then be changed. After this, delete the variable conn again, because otherwise problems will occur when you want to apply the connection.
- You can now save both parts again and update the sub-structure as well as the element installation. In the Element installation dialogue window, the diameter variable will appear, allowing you to specify the desired value.
- After recalculating the assembly for an updating of the connection, all bores - both in the asbestos cement panel and in the T-beam - will have the same diameter.
After changing the diameter in the Properties of the element installation, just a feature recalculation will now be required for the updating of all bores.