C# that changes member attributes in Tekla Structural Designer?

For the Tekla Structural Designer Grasshopper plugin there is no OOTB option to change
the attributes of a member. So, I want to make a custom component in C# to do that.
How would you recommend I do that.
I figured out how to “READ” the member attributes (say global offset at end “z” value)
I Need to know how to CHANGE the member attributes. (it shows it is possible as shown in image)

Here is the code to “READ” attributes

Also are the Tekla and Tekla structural designer grasshopper component code available anywhere?

Hi Marcello

In our Github repository for TSDRemotingAPIExamples we have recently added an example called CreatingAndAnalyzingModel. This example shows how you could change the alignment of a member (see CreateModelObjects.CreateConcreteBeams). Instead of changing the SnapLevelMinor as shown in the example, you would just need to change the EndGlobalOffset by providing a new vector with the required value.

The code for the Tekla Structural Designer Grasshopper plugin components are not currently available publicly.

It’s really interesting to see how you are trying to extend the plugin. I hope my suggestion helps.

Matt (Trimble)

1 Like

thank you that was a big help I was able to change the Global Offset Value as shown. I will keep you posted ApplyEntityAsync on the IEntity on the IMember was the key to “Updating” so thanks!

@Matt25 Hi I am having trouble finding TSD API documentation could you direct me on where to get that information? In the meantime I am finding methods by trial and error.
If you know could you tell me where to look for the following because none of the examples on GITHUB show how to do similar functions
Creating and Assigning a Property Set
Setting deflection limits to existing members
extracting geometry of existing members
adding custom buttons and menus that includes display changes
Thank you

Hi Marcello,

The TSD API is documented here:

On the top there are shortcuts to API reference and Documentation (which contains some code examples).



I found the documentation thank you

1 Like

Hi Marcello

Creating and assigning property sets - this is not currently possible using the API.
Setting deflection limits to existing members - this is not yet a feature of the API, it is something we could add.
extracting geometry of existing members - this should be possible and hopefully the documentation has helped you. Let me know if you need further information. We may consider creating a new Github example to demonstrate this.
adding custom buttons and menus that includes display changes - this is not currently possible using the API.


Hi Matt. I’m looking to use the API to extract member data from the model and was wondering if you could please provide some guidance? I am specifically interested in the node coordinates at the start and end of members, and the members’ section sizes. I have looked through the documentation and found out how to get a list of all the nodes in a member, their construction point indices, then the coordinates of the points at those indices. Is there a way to more directly get the coordinates of the points in a member. Also, if a beam has more than one node along its length, how can I ensure I get the nodes at the start and end? I was not able to determine how to get the section size of the member, so if you can please point me in the right direction, that would be greatly appreciated.

No there is not a more direct way to get the end point coordinates from a member.

Also a beam should only have two nodes (start and end).
The “span” of that beam will have a (start and end) so you may be experiencing a beam with multiple spans and that is why you are seeing more than two points along the beam’s length.
The method described below will get the member end points, but if you want to double check…
You could extract the length of the beam from the properties then calculate length from the two indices that you extracted and if they are equal you have the end points. There is no properties on the construction points that state if they are connected to specific elements or endpoints.

TSD points work with a master list of “construction points” (as you stated)
These are all the points in a list from 0 to n of all the points in the model including member end points. free points etc. SO,

You have to first get the IMember list from the IModel
await …GetMembersAsync(null);

Then extract your specific member via selecting its index from the list
You want to get the member and not the member span because the member will have the end points. The span will have intermediate points which it seems you do not want here.

Then get the ConstructionPointIndex for each end of the member.
That is found on the member-value-constructionpointindex-value
then once you get the point indices (say 200 and 401 for example)

You need to get the construction point index list.
That is done by extracting it from the IModel
await …GetConstructionPointsAsync(null) ;
Once you get the construction point list you have to search thru all the indices in the list until you find your specific end point indices (remember it was 200 and 401 for example)
Once you find those two end point indices then you have to extract the
X,Y and Z values from those two indices by getting the -Coordinates - Value -X; Y then Z

If you want the section of the element
that is on the span of the element
you would need to extract the element as described above then extract the specific span on that element then get the - ElementSection and the section will be on that object.

@Matt25 could confirm


That all sounds correct. I’m working on some code that could be a public example when ready, something like this:

foreach( var member in members.Where( m => m.Data.Value.MaterialType.Value == materialType ) )
				var constructionPoints = await model.GetConstructionPointsAsync();

				foreach( var span in await member.GetSpanAsync( new[] { 0, member.SpanCount.Value - 1 } ) )
					var section = span.ElementSection.Value as IMemberSection;
					var startPoint = constructionPoints.FirstOrDefault( c => c.Index == span.StartMemberNode.ConstructionPointIndex.Value );
					var endPoint = constructionPoints.FirstOrDefault( c => c.Index == span.EndMemberNode.ConstructionPointIndex.Value );
1 Like

Thank you for the help @Matt25 and @msgambelluri :slight_smile:

Having clarity by showing the public on how to Get the endpoints To explain how the existing API works is helpful.

Why not take it a step further?

And have Trimble create a helper class that includes all of the example you showed so the end point coordinates could be a property on the element…
So Instead of the long code that requires searching and iterations by the user it could look something like…

Double startPtX = (member here).startpoint.X; ?

This would be Direct and easy to understand.
With helper classes that Trimble develops this would also encourage others to use the TSD API.

Hi Matt,
is it posible to convert tekla drawings into pdf using api without selecting any objects, drawings. but we can provide an input in userdefined field . is it possible using API.

Hi Peter

Are you referring to Tekla Structural Designer, or Tekla Structures?

If Tekla Structural Designer, the answer is no, it is not possible.

I am not sure about Tekla Structures - I can forward your query if it is about that application.

Kind regards,