Example #1
0
        ///<summary> This gets called when when the user runs this command.</summary>
        public override IRhinoCommand.result RunCommand(IRhinoCommandContext context)
        {
            MRhinoGetObject go = new MRhinoGetObject();

            go.SetCommandPrompt("Select hatch to explode");
            go.SetGeometryFilter(IRhinoGetObject.GEOMETRY_TYPE_FILTER.hatch_object);
            go.GetObjects(1, 1);
            if (go.CommandResult() != IRhinoCommand.result.success)
            {
                return(go.CommandResult());
            }

            IRhinoHatch hatchObject = MRhinoHatch.ConstCast(go.Object(0).Object());

            if (null == hatchObject)
            {
                return(IRhinoCommand.result.failure);
            }

            List <Guid> objectGuids       = new List <Guid>();
            int         objectGuids_Count = ExplodeHatch(context.m_doc, hatchObject.Attributes().m_uuid, ref objectGuids);

            return(IRhinoCommand.result.success);
        }