Convert ModelObject to DrawingObject ( BoltArray to Mark )

Hi everybody.
I’m trying to write a script that converts from BoltArray to Mark. Right now I don’t know how to convert. Can anyone give me a solution. Thank you.
Script files and illustrations are attached!

BoltArray To (5.4 KB)

Hi Mr.Min,

there is some sample code in the Tekla API reference for the Mark class:

In particular, look for this section which seems to create a mark based on a ModelObject (like a BoltArray):

Mark Mark = new Mark(modelObject);
Mark.Attributes.Content.Add(new TextElement("My Mark"));
Mark.Placing = new AlongLinePlacing(PartMiddleStart, PartMiddleEnd);
Mark.InsertionPoint = PartCenterPoint;

For Tekla API stuff you can also try the Tekla developer forums:




Thank you for responding. In fact, I’m wanting to get the mark from the boltarray, not create the mark.

Hi Sebastian, I have a few questions if you could please help:

  1. How to get the string TextElement from the Content, I would like to have an if loop wrapped around it.
  2. How to set the merge mark (show in picture below) using API?
  3. Kind of combining 1 & 2, if I can set merge mark to off, it will show something like C1(B/S) in the GAD and I would like to change it to 2C1 (these are double size column FYI)
    Thank you!


Sorry for the late reply (vacation times).

For these drawing API questions I’d recommend the Tekla Developer center with examples and API reference:

as well as the API forum: