2020-07-30 18:06:22 提示输入起点,终点,画一条线段 DrawingHandler MyDrawingHandler = new DrawingHandler(); Tekla.Structures.Drawing.UI.Picker picker = MyDrawingHandler.GetPicker(); TSG.Point firstPoint = null; TSG.Point secondPoint = null; ViewBase view = null; picker.PickTwoPoints('please input first', 'please input second', out firstPoint, out secondPoint, out view); if (MyDrawingHandler.GetConnectionStatus()) { Tekla.Structures.Drawing.Line MyLine; Drawing currentDrawing = MyDrawingHandler.GetActiveDrawing(); if (currentDrawing != null) { MyLine = new Tekla.Structures.Drawing.Line(view as ViewBase, firstPoint, secondPoint, 0.0); MyLine.Insert(); } } 在创建前,可以设置线段的属性。 MyLine.Bulge = 1.0; 例如设置线形 MyLine.Attributes.Line.Type = LineTypes.DashedLine; |
|