I have two lists. One is a list of object coordinates. One is a list of strings that relate to each elevation.
I’m trying to order the coordinates by Z and somehow match the string ordering with the new order Z value list.
I’I’m using the sort by function by plugging in the Z point value to a merged list containing the coordinate and the string with separate. However, sort by function ignores the Z point order as it contains a string at the end.
I’ve also looked a sorting by keys but cannot seems to get the results i require. And finally, i do not want to format the original excel file to change the order and i would like to be able to carry the ordering in dynamo.
The screen shots are below
The images show the raw data reading from two columns of an excel file.
The other image shows the sort by z point failing to re-order as the string is at the end. I tried the command without the string and it worked. However, i need to match the strings to the list of sorted coordinates by Z point.
It would be great if somebody could help. There maybe a alternative and more simple way?