Hi I’m looking for an easy and simple way to get rhino document groups into grasshopper with python, as a series of list containing geometry elements.
what i’m currently doing in the python component of gh is this:
rs,obj_ref = RhinoGet.GetMultipleObjects("Select object", False, ObjectType.AnyObject) #print obj_ref for ref in obj_ref: r= ref.Object() print r.Attributes.GetGroupList()
After i can get for each element a reference for the group where it belongs and use it later with a grouping function, like groupby().
In this way i will get a series of lists containing all the elements with the same Attributes.GetGroupList() of each geometry, and iterate each list (group) to do what i need.
This might work but it looks very complicated, Any other ideas?
I have also seen this, Rhino.Input.Custom.GetObject() with the GroupSelect property set on True, but i’m not sure how to run the all series of commands, and if it will do what i need.