Are your lines aligned to a grid? You could use pathfinding if they are.
Are you drawing your lines at runtime? You could create a list of waypoints with whatever input you're using to draw the line in the first place.
If you have pre-drawn lines in the layout editor, you could manually place waypoints as well.