///<summary> This gets called when when the user runs this command.</summary> public override IRhinoCommand.result RunCommand(IRhinoCommandContext context) { OnLine line = new OnLine(); OnPlane plane = new OnPlane(); MRhinoGetPoint gp = new MRhinoGetPoint(); gp.SetCommandPrompt("Start of line"); gp.GetPoint(); if (gp.CommandResult() != IRhinoCommand.result.success) { return(gp.CommandResult()); } line.from = gp.Point(); plane = new OnPlane(RhUtil.RhinoActiveCPlane()); plane.SetOrigin(line.from); gp.SetCommandPrompt("End of line"); gp.Constrain(plane); gp.SetBasePoint(line.from); gp.DrawLineFromPoint(line.from, true); gp.GetPoint(); if (gp.CommandResult() != IRhinoCommand.result.success) { return(gp.CommandResult()); } line.to = plane.ClosestPointTo(gp.Point()); if (!line.IsValid()) { return(IRhinoCommand.result.nothing); } SampleCsDrawArrowheadConduit conduit = new SampleCsDrawArrowheadConduit(plane, line, 1.0); conduit.Enable(); context.m_doc.Redraw(); MRhinoGetString gs = new MRhinoGetString(); gs.SetCommandPrompt("Press <Enter> to continue"); gs.AcceptNothing(); gs.GetString(); conduit.Disable(); context.m_doc.Redraw(); return(IRhinoCommand.result.success); }