Tekla Open API: Cast Units
This article explains how you can create cast unit using the Tekla Open API in VB.Net.
Contents
Step 1:
Add reference to the Tekla.Structures.Model and the Tekla.Structures library located in the path “C:Program FilesTekla Structures20.0ntbinplugins” and manually open the tekla model. This has been covered in the article below:
Step 2:
The next step would be to get reference to the parts you would like to add to an assembly. This can be done in different ways. Below are a couple of example for achieving this:
- Get reference to existing objects in the model.
- Create new parts and save their reference.
- Ask the user to select objects from the model
Creating a Cast Unit:
Consider the model below:
The model consists of 3 columns and 2 beams. In reinforced concrete models it is beneficial to add the beams to cast units. The beams in the model can be added to a cast unit using the code below:
Private Sub CreateCastUnit(ByRef objBeam1 As TSM.Beam, ByRef objBeam2 As TSM.Beam) Dim objAssembly As TSM.Assembly objBeam1.CastUnitType = Tekla.Structures.Model.Part.CastUnitTypeEnum.CAST_IN_PLACE objBeam2.CastUnitType = Tekla.Structures.Model.Part.CastUnitTypeEnum.CAST_IN_PLACE objAssembly = objBeam1.GetAssembly objAssembly.Add(objBeam2) objAssembly.Modify() End Sub
If you need assistance with your Tekla model, or you are looking for a Tekla Open API programmer to hire feel free to contact me. Also please visit my home page www.software-solutions-online.com
One thought on “Tekla Open API: Cast Units”