Tags

, , , , ,

This article explains how to insert a concrete beam in a tekla model using the Tekla Open API in VB.Net.

Previously in the article Insert Concrete Column Using VB.Net (Tekla Open Api) I’ve explained how to add columns to a tekla model. Adding beams is exactly the same. The difference will be in the start and end point coordinates. The start and end points coordinates for a column will have a different “Z” parameter whereas for a beam they will have different “X” and “Y” parameters.

Remember to reference the Tekla.Structures.Model.dll and the Tekla Structures.dll assemblies and manually start the application before running the code. This has been previous explained in the article below:

The code below will insert a 10m column in the “X” direction:

Sub main()
'hanlde to application
Dim appModel As Tekla.Structures.Model.Model
'column object
Dim objColumn As Tekla.Structures.Model.Beam
'start insertion point
Dim objStartPoint As Tekla.Structures.Geometry3d.Point
'end point of column
Dim objEndPoint As Tekla.Structures.Geometry3d.Point

'object initializers
appModel = New Tekla.Structures.Model.Model
objColumn = New Tekla.Structures.Model.Beam
objStartPoint = New Tekla.Structures.Geometry3d.Point(0, 0, 10000)
'coordinates are in mm
objEndPoint = New Tekla.Structures.Geometry3d.Point(10000, 0, 10000)

'the name of the column
objColumn.Name = "Column_1"
'the column section dimensions
objColumn.Profile.ProfileString = "800*800"
'the column material
objColumn.Material.MaterialString = "C25/30"
'the column start point
objColumn.StartPoint = objStartPoint
'the column end point
objColumn.EndPoint = objEndPoint
'inserts the column in the model
objColumn.Insert()
'applies the changes
appModel.CommitChanges()
End Sub

Result:
Result

For an explanation about the code please see the article below:

You can download the file and code used in this article from the link below:

Advertisements