Get rotation or direction from selected object (polyline)

Hi
Convert polyline to alignment
And Using this is