protected override Result RunCommand(Rhino.RhinoDoc doc, RunMode mode) { const ObjectType geometryFilter = ObjectType.Mesh; GetObject go = new GetObject(); go.SetCommandPrompt("Select meshes to compute contacts"); go.GeometryFilter = geometryFilter; go.GroupSelect = true; go.SubObjectSelect = false; go.EnableClearObjectsOnEntry(false); go.EnableUnselectObjectsOnExit(false); go.DeselectAllBeforePostSelect = false; GetResult res = go.GetMultiple(1, 0); if (res != GetResult.Object) { return(Result.Cancel); } Rhino.RhinoApp.WriteLine(res.GetType().ToString()) return(Result.Success); }
/// --------------------------------------------------------------------------- /// <summary>Parses values for enum</summary> /// --------------------------------------------------------------------------- static public string ParseType(GetResult value) { return ParseType(value.GetType().ToString(), value.ToString()); }