Tekla Open API: Cast Units

This article explains how you can create cast unit using the Tekla Open API in VB.Net.


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:


Creating a Cast Unit:

Consider the model below:
Blog_Tekla_API_CastUnit_1
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”

  1. Eric says:

    Thanks for the article. I’ve got a question about the article. Is it also possible to add the beams as sub-assembly (on a lower assembly hierarchy level) to the columns?

    Kind regards,

    Eric

Leave a Reply

Your email address will not be published. Required fields are marked *



© Copyright 2017 software-solutions-online.com.