2024年4月2日发(作者:)

在Tekla的安装目录(D:TeklaStructures13.0ntbinplugins)中为我们提供了.Net

API接口,利用这些接口,可以实现对Tekla模型的控制和修改操作。本贴将讲述一个最简

单的在Tekla中创建梁对象的示例,通过一个按钮在运行的Tekla进程中快速创建模型。需

要注意的是,运行此示例程序时Tekla程度需要打开一个模型。

要连接Tekla模型数据库,需要在C#中添加“”的引用,按

钮下代码如下(C#):

private void button1_Click(object sender, EventArgs e)

{

Model M = new Model();

if (nectionStatus())//判断是否获取了Tekla进程

{

Pt1 =

new (0,0,0);

Pt2 =

new (6000,0,0);

Pt3 =

new (6000, 3000, 0);

Pt4 =

new (0, 3000, 0);

Pt5 =

new (0, 0, 3000);

Pt6 =

new (6000, 0, 3000);

Pt7 =

new (6000, 3000, 3000);

Pt8=

new (0,3000, 3000);

Beam C1 = new Beam(Pt1,Pt5);

Beam C2 = new Beam(Pt2,Pt6);

Beam C3 = new Beam(Pt3,Pt7);

Beam C4 = new Beam(Pt4, Pt8);

eString = "HM440*300*11*18";

eString = "HM440*300*11*18";

eString = "HM440*300*11*18";

eString = "HM440*300*11*18";

alString = "Q235B";

alString = "Q235B";

alString = "Q235B";

alString = "Q235B";

= "Column";

= "Column";

= "Column";

= "Column";

= ;

= ;

= ;

= ;

Beam B1 = new Beam(Pt5, Pt6);

Beam B2 = new Beam(Pt6, Pt7);

Beam B3 = new Beam(Pt7, Pt8);

Beam B4 = new Beam(Pt8, Pt5);

eString = "HN400*200*8*13";

eString = "HN400*200*8*13";

eString = "HN400*200*8*13";

eString = "HN400*200*8*13";

alString = "Q235B";

alString = "Q235B";

alString = "Q235B";

alString = "Q235B";

= "Beam";

= "Beam";

= "Beam";

= "Beam";

();//插入梁到模型数据库

();

();

();

();

();

();

();

Changes();

}