I recommend converting your NurbsCurve to a Polycurve and using an average intersection
of the elements geometry to determine the numbering sequence. This is because the “Location” of your elements is defined as the same for each parking space on either side of the row, and this introduces extra calculations to determine which of the two identical points is closer.
Also, your parking spaces are all at different elevations, so to simplify the intersection calculation of all the parks along a planear curve, I projected all the geometry to the same XY plane. Hope that makes sense.
Parking Space Numbering.dyn (20.9 KB)