(Tekla Structures二次开发)创建多边形板

提示用户输入点,并以此创建多边形板。
下面是创建多边形板的方法代码

private void contourPlate()
        {
     
            TSM.Model model = new TSM.Model();
            TSMU.Picker _picker = new TSMU.Picker();
            ArrayList pickedPoints = _picker.PickPoints(Picker.PickPointEnum.PICK_POLYGON, "Pick polygon points");

            ArrayList contourPoints = new ArrayList();
            foreach (TSG.Point point in pickedPoints)
            {
     
                ContourPoint contourPoint = new ContourPoint(point, new Chamfer());
                contourPoints.Add(contourPoint);
            }

            TSM.ContourPlate CP = new TSM.ContourPlate();
            CP.Contour.ContourPoints = contourPoints;
            CP.Profile.ProfileString = "PL25";
            CP.Material.MaterialString = "Q235B";
            CP.Class = "12";
            CP.Insert();
            model.CommitChanges();
        }

你可能感兴趣的:(Tekla)