How to 3D rotate to specific 3D axis?

I have an object in 3D space. For the moment it is made up of straight lines. I would like to create a solid from it and to do so I intended to create a surface that represents the cross-section and to use the Sweep Rail command. How do I move and rotate the surface so that the normal of that surface lies along the the axis of one of the arms of my object?

For example, in my picture below…

you can see a circle that I want to use as the surface for my rail command. Above it is a line that I would like to use as a rail. However, this rail points in a direction that does not lie along any of the world axes. What is a simple way of rotating the circle so that the surface of the circle would be perpendicular to the line?

I think you’re looking for OrientOnCrv

That’s great. Thank you.