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 top.like this.


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

getObjects.3dm (41.5 KB)
getObjects.gh (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