How to rotate CROPBOX views to always same position

Hello everyone, I’m preparing a routine for shopdrawings of hollow core slabs, and I need a specific view to always come out horizontally, regardless of the slab’s position and direction, I tried to consult here on the forum and found some topics, but none that helped me solve.
Here is the example image, and one of the nodes I was testing.

Original Position

position of view that I want

I think my approach would be to get the rotation of an element. Then rotate the Crop Box accordingly. You probably have to change the size of the Crop Box accordingly as well (after the rotation).

Hello…probably something here work…

1 Like

the cropbox problem I solved according to the element, however the rotation must always respect that beam direction.

From left to right (horizontally). Here is an example of various beams and their directions, and their respective angles to be rotated

The view must be rotated to be this way, heres a example:

So are you saying you just need what x° to rotate the cropbox by?

Wouldn’t be tan^1[(start_y-end_y/start_x-end_x) as the degrees you rotate each individual by?

For the size, use length of member and width of member, place it at the center point, and then rotate about the center.

You could also take the absolute of the degrees so you aren’t over rotating but that can come with testing.

Almost, the problem is that when the beam direction changes, the turning angle must be different, because the beam start must always be from left to right

the biggest challenge is that changing the beam’s direction changes the rotation angle
What I’ve already achieved: