public PromptResult StartJig(Polyline polyline, Point3d fPt, int vx, string workType) { _prevPoint = fPt; _polyline = polyline; _startPoint = fPt; _vertex = vx; _startBulge = _polyline.GetBulgeAt(_vertex); _workType = workType; return(Application.DocumentManager.MdiActiveDocument.Editor.Drag(this)); }
public Polyline CopyPolyline(BlockTableRecord spaceRecord, ref Polyline pline, Transaction tr) { Polyline newpLine = new Polyline(); int max = pline.NumberOfVertices; for (int i = 0; i < max; i++) { newpLine.AddVertexAt(i, pline.GetPoint2dAt(i), pline.GetBulgeAt(i), pline.GetStartWidthAt(i), pline.GetEndWidthAt(i)); } newpLine.Closed = pline.Closed; //newpLine.Layer = pline.Layer.Split('|').Last(); newpLine.Layer = frameBlockAboveLayer; newpLine.Normal = pline.Normal; newpLine.Color = pline.Color; newpLine.ColorIndex = pline.ColorIndex; spaceRecord.UpgradeOpen(); spaceRecord.AppendEntity(newpLine); tr.AddNewlyCreatedDBObject(newpLine, true); spaceRecord.DowngradeOpen(); return(newpLine); }