Redistribute tags evenly along selected line

Hi Guys,

Firstly Thankyou for this amazing forum, i have enjoyed learning and sharing so far.

The quest…
So I am wanting to develop a script that would can Redistribute tags evenly along selected line.
I have not come across anything on the forum that is yet to discuss this.

The image below shows what i am after.

Here is what i have so far

I am thinking of using something like this but i need it to distribute along a line regardless of the plane…
So i don’t know or think this will work

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

def sort_coordinates(coordinates, start_y, end_y):
    step = (end_y - start_y) / (len(coordinates) - 1)
    for i, coord in enumerate(coordinates):
        coord[1] = start_y + i * step
    return coordinates

# IN(0) - List of 3D Point Coordinates
# IN(1) - Start Y
# IN(2) - End Y
coordinates = IN[0]
start_y = IN[1]
end_y = IN[2]

OUT = sort_coordinates(coordinates, start_y, end_y)

Thanks in advance

Brock