Tekla Open API: Start/End Point Offsets

Understanding the start and end points of a part object is essential when working with parts. Start and end points are displayed using a square at both ends of the part:
Blog_Tekla_RotatePart_1
By modifying the start and end point offsets you will be able to change their relative position with respect to the part. In the figure above the start/end points are located at the edge of the part. In the figure below however they have been moved to the center line of the part:
Blog_Tekla_StartEndPointOFfsets_2
This can be useful when you are trying to align the part properly. Columns should generally have the start and end points set to their centerline. While it may be beneficial to have the start and end points of beams set to their upper side since the upper side of beams are aligned at each elevation.

Aligning the start and end points with the centerline of the part also has the advantage that there won’t be a need for an additional move command after rotating the part.


Step 1:

Add reference to the Tekla.Structures.Model 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:

You will need to get reference to the part you wish to modify its start and end point offsets. Below are some of the options for achieving this:

1 – Create a new part and keep a reference to the part: Insert Concrete Beam Using VB.Net (Tekla Open API)

2 – Get reference to an existing part in the tekla model: VB.Net Get Reference to Object, Tekla Open API

3- Ask the user to select parts from the model: Tekla Open API: Ask User to Select Objects.


Step 3:

Note in this example it is assumed the part has a dimension of “1800*800”. The start and end points are located along the shorter side of the part. By using the code below the part will be adjusted so that the start and end points will be at the center of the part. Pass the reference of the part you have attained in the previous section to the function below:

Imports TSM = Tekla.Structures.Model
''' <summary>
''' Adjusts the part so that the start and end points will be located at its center
''' </summary>
''' <param name="objBeam"></param>
''' <remarks></remarks>
Private Sub ChangeOffsets(ByRef objBeam As TSM.Beam)
Dim appTekla As New TSM.Model
objBeam.StartPointOffset.Dz = 900
objBeam.EndPointOffset.Dz = 900
objBeam.Modify()
appTekla.CommitChanges()
appTekla = Nothing
End Sub

Before:
Blog_Tekla_StartEndPointOFfsets_3
After:
Blog_Tekla_StartEndPointOFfsets_2


.Dx, .Dy and .Dz:

.Dx, .Dy and .Dz are the offset values in the local x, y and z directions. Based on tests that I have run the local x, y, and z directions are defined as follows:
Blog_Tekla_StartEndPointOFfsets_7

The local X axis is along the the line that start from the end point and extends to the start point. Note the local X axis may not always be aligned with the global Z axis.

In order to find the local Z axis all offsets must be set to zero. This includes:

After setting all offsets to zero the local Z axis can be defined as follows:

  • Is in the plane perpendicular to the local X axis.
  • Starts from the face the local X axis is located on and continues to the opposing face.
  • Is parallel to the side faces.
  • May or may not be aligned with the global X axis.

Note: Offsets do not affect the local axis. Therefore once you have figure out where your local axis are you can apply as many offsets as required and the local axis will not change.

The local Y axis is found by using the right hand rule, starting from the local X axis and moving to the local Z axis.

Example1:

Start Point End Point Original Rotational Offset
Dx Dy Dz Dx Dy Dz
0 0 0 1000 0 0 0

Before:
Blog_Tekla_StartEndPointOFfsets_5
After:
Blog_Tekla_StartEndPointOFfsets_6
Note: The top face of the part is moved so that the relative displacement of the end point with respect to its original position will be +1000.

Note: Start and End points are not displaced due to offsets.

Example2:

Start Point End Point Original Rotational Offset
Dx Dy Dz Dx Dy Dz
0 0 1000 0 0 1000 0

Before:
Blog_Tekla_StartEndPointOFfsets_5
After:
Blog_Tekla_StartEndPointOFfsets_8

Note: The part is moved in a manner that will cause the start and end points to have a relative displacement of +1000 in the z direction.

Note: Offsets do not move or modify the section of the part. Therefore only rigid body movements, rotations and elongations are possible when offsets are applied.

Example3:

Start Point End Point Original Rotational l Offset
Dx Dy Dz Dx Dy Dz
0 0 1000 0 0 1000 45

Before:
Blog_Tekla_StartEndPointOFfsets_9

After:
Blog_Tekla_StartEndPointOFfsets_10

Note: It can be seen the part undergoes the same displacement relative to its start and end points as in example 2. As mentioned before, local axis are not modified by offsets.

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

Leave a Reply

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