protected override Result RunCommand(RhinoDoc doc, RunMode mode) { // The following code lets you toggle the conduit on and off by repeatedly running the command if (m_conduit != null) { m_conduit.Enabled = false; m_conduit = null; } else { m_conduit = new MyConduit { Enabled = true }; } doc.Views.Redraw(); return Result.Success; }
protected override Result RunCommand(RhinoDoc doc, RunMode mode) { // The following code lets you toggle the conduit on and off by repeatedly running the command if (m_conduit != null) { m_conduit.Enabled = false; m_conduit = null; } else { m_conduit = new MyConduit { Enabled = true }; } doc.Views.Redraw(); return(Result.Success); }