GetSelectedObjects() order

Hello everyone
When I use the GetSelectedObjects() method, I found that the order of this method is frame selection from the bottom left corner to the this.

And my selection order is blue numbers. Is there a way to maintain the selected order? Thank you

getObjects.3dm (41.5 KB) (5.3 KB)

I found a solution: first create a dictionary, and then subscribe to three events (Rhino.RhinoDoc.SelectObjects/Rhino.RhinoDoc.DeselectObjects/Rhino.RhinoDoc.DeselectAllObjects) to record the order of selection.

1 Like


Can you give a sample of code of how to retain the selection order in GetSelectedObjects() ?

Iā€™m working with grips objects.