If I select a bunch of geometry (let’s say a set of curves) in Rhino, then load them into a parameter in Grasshopper (right click a curve parameter and pick Set Multiple Curves), is there any rhyme or reason to the order of the items in the resultant list in GH?
Like, the order they were selected in Rhino? The order they were created in Rhino?
My guess is that there is nothing I can depend on, but I’m curious.
(I ask because I need to select geometry that I previously baked in one GH script, and I need to ensure that it’s in a particular order…)
From what I recall, the order in which you select objects prior to setting them into GH is not respected. I can be wrong but I think what GH does is automatically sort things based on Euclidean coordinates.
You might have to reference/match geometry to your original script.
If you select them in Rhino first and then Set Multiple Curves, they will be ordered by first created in Rhino. If you deselect everything in Rhino, then Set Multiple Curves and select the curves one-by-one, this selection order will be preserved. If you deselect everything in Rhino and then Set Multiple Curves and select the curves using marquee selection, they will be also be ordered by first created. Demonstrating the last two options here:
Sounds like you might want to have a look at the native Geometry Cache component.