Tekla Weld

i want a component that i can weld main part to secondry part
i know it’s not available in tekla packge but i don’t have knowledge to crate it with c#
can any one help me with this ?

2 Likes

You can make like this.

2 Likes

thank u sir
if i want to modify object like beam or coulmn exist in model how i can do that? like i want to change profile of member in model

You can “deconstruct beam” and do the changes.

deconstruct just extract object data and if i want to make a change need to recreate the same object
i ask about somthing live edit like dynamo in revit

You cant make like this in Tekla. Once you disconnect/bake to tekla, you have to make new parts.

it’s work
but when i change size of weld it duplicate with old side is there any solution ?

You need to Modify() your old weld rather than Insert() a new one each time. In order to do that you need to obtain the right Weld to modify of course.

Best way is to store the GUID of the generated weld(s) and then get the weld based on that GUID when it’s time for modification

1 Like

can u modify script and upload
sorry for that because really i dont have good knowledge about tekla api

sorry for that sir

and thank you for helping me

Something like this… I didn’t tested this.

private void RunScript(System.Object MainPart, System.Object SecondPart, double Size, int Work_Site, ref object Weld)
{
Tekla.Structures.Model.Part mainpa = (Tekla.Structures.Model.Part) MainPart;
Tekla.Structures.Model.Part secpa = (Tekla.Structures.Model.Part) SecondPart;
Tekla.Structures.Model.Weld WeldF;

var weldEnum = secpa.GetWelds();
if (weldEnum.MoveNext())
{
  WeldF = weldEnum.Current as Weld;
}
else
{
  WeldF = new Weld();
}

Weld = new Weld();

WeldF.TypeAbove = BaseWeld.WeldTypeEnum.WELD_TYPE_FILLET;
WeldF.SizeAbove = Size;
WeldF.MainObject = mainpa;
WeldF.SecondaryObject = secpa;

if (Work_Site == 1)
{
  WeldF.ShopWeld = true;
}
else
{
  WeldF.ShopWeld = false;
}
if (secpa != null)
{
  if (mainpa != null)
  {
    if (WeldF.Identifier.IsValid())
    {
      WeldF.Modify();
    }
    else
    {
      WeldF.Insert();
    }
    Weld = WeldF;
  }
}

new Tekla.Structures.Model.Model().CommitChanges();

}

u dosen’t use a record guid in this code
i’m not rapid for it u can write it in c# component and test it and if it work well upload gh script and i will try it

thank you agian

If really you want or learn , you have to try it yourself. Pls don’t depend always others.

i really start learn with c# and i’m still in basics and asking here for help until i can achive to api and will create my component

I will test this this with GUID and will upload this script later.

1 Like

thank u sir
and sorry for annoying you

Here is the weld script for Tekla.


Create Weld in Tekla.gh (12.7 KB)

6 Likes

Many Kind of thanks

I guess there is a rather easy way to edit the “Create weld”-script to a “Polygon weld” instead of “Weld between parts”. I gave it a try but Im also not to familiar with C# coding. If you could help me with this I would be very grateful. :slight_smile:

Hi,

Essentially you have to switch the type to a PolygonWeld and add the conversion from a Rhino Polyline to a list of Contour Points.

 WeldF.Polygon.Points.Clear();

    for (int i = 0; i < poly.Count; i++)
    {
      Point3d p = poly[i];
      WeldF.Polygon.Points.Add(new Tekla.Structures.Geometry3d.Point(p.X, p.Y, p.Z));
    }

I think this will cause problems if you have both welds and polygonwelds on the same Part, but here you go :

Create PolygonWeld in Tekla.gh (15.6 KB)

2 Likes

Thank you so much!