Tekla二次开发_模型中创建螺栓组(7) - 钢结构资源网 Tekla插件 CAD工具 犀牛GH汉化 Tekla二次开发_模型中创建螺栓组(7) - 钢结构资源网 Tekla插件 CAD工具 犀牛GH汉化

Tekla二次开发_模型中创建螺栓组(7)

private void BoltArray()
        {
            TSMU.Picker _picker = new TSMU.Picker();
            ModelObject mo = _picker.PickObject(TSMU.Picker.PickObjectEnum.PICK_ONE_PART);
            TSG.Point p1 = _picker.PickPoint();
            TSG.Point p2 = _picker.PickPoint();
            Part cp = mo as Part;

            TSM.BoltArray B = new TSM.BoltArray();
            B.PartToBeBolted = cp;
            B.PartToBoltTo = cp;

            B.FirstPosition = p1;
            B.SecondPosition = p2;

            B.BoltSize = 20;
            B.Tolerance = 2.00;
            B.BoltStandard = "TS10.9";
            B.BoltType = BoltGroup.BoltTypeEnum.BOLT_TYPE_WORKSHOP;
            B.Length = 150;
            B.ThreadInMaterial = BoltGroup.BoltThreadInMaterialEnum.THREAD_IN_MATERIAL_NO;

            B.Position.Depth = Position.DepthEnum.MIDDLE;
            B.Position.Plane = Position.PlaneEnum.MIDDLE;
            B.Position.Rotation = Position.RotationEnum.FRONT;

            B.AddBoltDistX(100);
            B.AddBoltDistX(90);
            B.AddBoltDistX(80);
            B.StartPointOffset.Dx = 100;

            B.AddBoltDistY(70);
            B.AddBoltDistY(60);
            B.AddBoltDistY(50);
            B.EndPointOffset.Dy = 200;

            //B.Nut1 = false;
            //B.Nut2 = false;
            //B.Washer1 = false;
            //B.Washer2 = false;
            //B.Washer3 = false;
            B.Bolt = false;

            if(!B.Insert())
            { MessageBox.Show("BoltArray insert failed."); }

            model.CommitChanges();
        }

评论 0

挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论