Get and Set Rotation Angle of View on sheet

Hello Dynamo Cummunity :slightly_smiling_face:

I have 2 identical PlanViews on a sheet, view left has been rotatet.
I would like to rotate view right by the same angle that view left has been rotatet.

After searching the forum i found a python script for rotating views.

It does work, but i don´t understand the input number. For example, if i use input “3” the view will rotate 180°.

I also have no idea how i can get the rotation angle of a view.

So i ask for your help and would be really happy about any advice!
Thank you!

Hi @gerhard.p ,

As explained in the post you linked, the difficulty isn’t to rotate the cropbox of a view but to get the rotation of the another view.

Good luck !

Thanks Alban,

So i have to find a workaround to get the rotation angle, in my example that would be to get the “rotation” of the Column.
And then i have to figure out how to set a specific angle to a view.
I´m going to try that in the evening

So it’s possible to retrieve the rotation of the CropBox and set the rotation of another CropBox.
At the same time, I added the section markers and Sectionboxes to my custom node.


Amazing! Looking forward to test it tomorrow and i will post my experiences!
Thank you Alban :+1:

Hello Alban,

I did a few tests and it is working fine, thank you so much for your help! :grinning:

With view.GetCropRegion.Element from Rhythm i should be able to get this to work in one of my scripts!

After more testing i found a problem. The problem is that i don´t get the rotation of a view, what i would like. I get the angle of the cropbox.

Here i have 2 examples of views that have not been rotatet, they have the original orientation of the Project.

In example one i get 0° rotation, nice.

In example two, instead of 0° i get 64.51

and this leads to the following result when i create a new Planview and try to set the same rotation to it:

What does work perfect is if the view has a rotation:

This view has a rotation and it is applied correctly to another view.

So the problem case is if a view has no rotation, but the cropbox is not horizontal…it seems…

I just figured out what the Problem is.

Before you can read out the Rotation Angle of a view you have to use the function Reset Crop!

Now i just have to find out how to do that in dynamo.

Here you can see a View without a rotation that gives me a “false” rotation. After resetting crop i get 0° and thats what i want.

1 Like


Thank you :slight_smile:

Now its working perfect :+1:

rotation.dyn (16.9 KB)