大家好,欢迎来到IT知识分享网。
一、准备阶段
1.Tekla structures 21.0
2.visual studio 2022企业版
以上是我使用的版本,使用的编译语言是C#
二、其他辅助材料
三、创建梁
1.打开Tekla软件,新建一个文件;
2.打开Visual studio创建一新项目;
3.
项目命名
4.点击视图,点击工具箱,会出现工具箱一栏
在工具箱中找到button按钮,鼠标左键点击不松开,拖拽到窗体中来
会出现一个按钮,以及这个按钮的属性栏,点击text可以改按钮的显示名字,这里我们改成创建梁,直接用鼠标可以调整按钮的大小
; model.CommitChanges();
10.完成代码如下:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; //using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Tekla.Structures; using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; namespace Tekla_Model04 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent(); } Model model = new Model(); private void button1_Click(object sender, EventArgs e) {
Point point = new Point(0, 0, 0); Point point2 = new Point(1000, 0, 0); Beam beam = new Beam(); beam.StartPoint = point; beam.EndPoint = point2; beam.Profile.ProfileString = "H100*100*6*8"; beam.Finish = "PAINT"; beam.StartPointOffset = new Offset(); beam.EndPointOffset = new Offset(); bool result = false; result = beam.Insert(); //Model model = new Model(); model.CommitChanges(); //Console.WriteLine("result"); } } }
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/148877.html