private void drawPentagon(PointD center, PointD vertex, double height, int ii) { Pekok.SolidWorks.swDoc.Extension.SelectByID2(TOP, "PLANE", 0, 0, 0, false, 0, null, 0); Pekok.SolidWorks.swDoc.SketchManager.InsertSketch(false); object[] sss = Pekok.SolidWorks.swDoc.SketchManager.CreatePolygon(center.X, center.Y, center.Z, vertex.X, vertex.Y, vertex.Z, 5, true); foreach (object b in sss) { ((SketchSegment)b).Select(true); } Pekok.SolidWorks.swDoc.SketchManager.InsertSketch(true); Pekok.SolidWorks.swDoc.Extension.SelectByID2("Sketch" + ii, "SKETCH", 0, 0, 0, false, 0, null, 0); Pekok.SolidWorks.swDoc.ClearSelection2(true); Pekok.SolidWorks.swDoc.Extension.SelectByID2("Sketch" + ii, "SKETCH", 0, 0, 0, false, 4, null, 0); Feature g = Puller.Cut(Pekok.SolidWorks.swDoc, height); Pekok.SolidWorks.swDoc.ClearSelection(); }