Box entity orientation

It is possible for a box entity to follow the orientation of a line entity?
Thanks for your help