Pile tags by sorted Y coordinates (minimun to maximum) but follow the sequence if Y has contanct values

Hi All, I am tring to make and script which tags my pile as per coordinates.
in my projects I need to tag my piles based on Y coordinates least values to max but at some point for a group of piles I have constanct Y coordinates values so I want to tag them frist before moving to next Y coordinates values.

in the scripts i sorted my Y values by and it gave me a list from least to max but when i used it in “Set.paramtervaluebyname” node its doesnt worked

I have tried for so many days Python and Dynamo nodes but nothing helped me to achieve that.

PileTag-Automation.dyn (52.3 KB)
am adding my script as well

Not sure what you’re trying to do…the python code in your script didn’t run by me, but it looks liek you’re trying to grab the geo-referenced points, so I grabbed a node from genius loci to convert between systems.

Also unsure what the other nodes did, I don’t have that package…

Anyways, this “worked” for me, but I’m somewhat blind to what oyu’re doing.

Let me know if ti works, and please provide screenshots with the lists and errors…that helps us help you. :wink:
PileTag-Automation - mow.dyn (58.9 KB)

Hello Mr. @m.owens, Thank you so much for your quick response. yes i wanted something like it, it has worked so well to sort the pile out with ref to Y-Coordinates but i need to start with minimum value of X-Cordinates(while keeping the Y-Coordinates 1st priority), I have attached an image of what i want and what the script is producing at the moment.

I tried sorting it further from Point X value but it has messed up with Point Y sortring

image