Animation Nodes: Allign object to direction of vector path/Line path
We will get this info by using the atan2() math function. We will use the x and y coordinates of your line starts and end.

In the loop where you initialize your line meshes, add a new parameter of type "Euler List". Disable the input and enable the output. Add a "Reassign" node on the right of your loop.



On the right, set this up :


So, we are getting the y Delta between the two points, then the x Delta. By using arctan2 we can get the angle on the x,y plane in radians.

We combine this angle into an Euler object with an equivalent rotation around Z axis, and add 90 degrees to it so the steps face the right direction.

We then fill a list with the same number of elements as we have steps. We then combine it with the previous list so that each vertex, and consequently each step, is associated with an angle.

Finally change your setup to accept the euler rotations. Don't forget to actually activate the rotations in the "Object Transforms Output" node.



Result (with a solidify modifier) :