I just wonder if anyone come across this idea before, due to my work I have to keep rotate and line up views in sheet. is it anyway we can rotate selected view with Dynamo? The rotate on sheet of Revit is very poor command, I usually have activate every single views then select crop view visible then rotate it. Is there any node or routine to allow rotate selected views?
Thanks for reading
Now the trick of course is to get the proper angle to rotate the view by, because I am guessing that you are looking to align it with some element in view (wall, grid etc.). To get view crop box I was using a little trick that Jeremy Tammik shared on his blog:
What happens here is that you turn off the crop box, select everything in view, then create exclusion filter for all these elements, then turn the crop box back on and select everything but previously selected things. This should leave you with the only new thing visible in view: CROP BOX.
I wouldn’t really recommend it because in my humble view it’s bad BIM
Once somebody rotates a view by an odd angle (i.e.12.4130245212 degrees) and forgets to document the change anywhere, there’s no quick way to rotate it back to its original position. Even worse, if you do attempt to shift it back manually and eff up the n-th digit (or a floating point number does its things and muddies things for you), your model accuracy will suffer and you might expose yourself to numerous annoying line misalignment warnings and other errors.
That’s why it’s better to use scope boxes (or the True North view setting) because you can quickly and safely go back to the view’s original state and continue modeling as usual.
This is great code and there’s definitely some isolated cases where you have no other choice but to modify the crop box but I’d only resort to that if I don’t have any other alternatives.
For the 180degrees rotation of multiple sections I have tried to use the code you supplied, however I am unable to get it to work. So I have a few questions; Of what type are the 3 inputs (view, cropbox, angle)? And why am I getting this error?
Warning: Cannot find static method or constructor Autodesk.DesignScript.Geometry.Line.Createbound()
I used the code in a code block(had to make a few syntax changes), is that the right way?