Reordering a list of planes

I have a set of polylines (pattern for sewing) and a subset of its CVs, which are used for numbering to sew the parts together correctly.

step 1
The CVs are sent to the “location”-inputs of TextTags3D. To give corresponding points the same number i used PointGroups, and listed the CVs in a tree, using the PointGroups as branches.

step 2
I generated the cut polylines by offsetting the sewing lines outwards.
Now i want to align the TextTags3D (the numbers from step 1) to the cut polylines. To make the numbers reside in the seam allowance area between cut and sew line and align them correctly, i created planes by evaluating the cut lines at the respective parameters.
These planes are also ordered in a tree, using the polylines as branches.

To align the TextTags3D to their respective closest plane i need to reorder the list of the planes for the “Location”-input. For the “Text”-input of the TextTags3D i have to use the PointGrouped CVs and keep them in their original tree-order. i just cant figure, how to reorder the planes without distroying the numbering texts. (103.4 KB)

I am not sure exactly how you want to sort the planes. But if you use the Sort component and zoom in. You can add lists that sort the same way. So, once you encode the sort keys for the planes, then you can sort the points and planes together with the keys.

hello scott,
i will try to explain more precisely with another screenshot:
the blue textfields contain the text-numbers, which should be aligned to the orange planes. the white text fields with the demo text are already aligned correctly.
i have already tried to use Sort unsuccessfully. i can sort the origins of the desired planes via closestPoint, but have no luck trying to use the keys to sort the planes. Not sure, if i understand and apply Sort correctly. (101.8 KB)

took some time to get it sorted!
and yes, it was pretty much all about figuring out how Sort works.