protected override Result RunCommand(RhinoDoc doc, RunMode mode) { var conduit = new SampleCsGetMultiplePointsConduit { Enabled = true }; Result rc; var gp = new GetPoint(); while (true) { if (0 == conduit.PointCount) { gp.SetCommandPrompt("Location of point object."); gp.AcceptNothing(false); gp.AcceptUndo(false); } else { gp.SetCommandPrompt("Location of point object. Press Enter when done"); gp.AcceptNothing(true); gp.AcceptUndo(true); } var res = gp.Get(); if (res == GetResult.Point) { conduit.AddPoint(gp.Point()); doc.Views.Redraw(); } else if (res == GetResult.Undo) { conduit.RemoveLastPoint(); doc.Views.Redraw(); } else if (res == GetResult.Nothing) { rc = Result.Success; break; } else { rc = Result.Cancel; break; } } if (rc == Result.Success && conduit.PointCount > 0) { doc.Objects.AddPoints(conduit.Points); } conduit.Enabled = false; doc.Views.Redraw(); return(rc); }