Rotate 3d isometric View

Hello everyone! Is there any way to rotate an existing 3d isometric view?. I have found the means to modify perspective views, but it doesn’t suit me.

It seems like the solution lies somewhere in DesignScript language or in Python. But i couldn’t find any specifications with system functions to set values in (view3d.orientation. etc.), either i noticed, sometimes people are using such functions in code blocks and it works.

Here i found some API, but i don’t understand how to translate it to Dynamo languages.

It seems to be a solution, but what if I need my view to be set by specified vector? For instance, if i’ve got a set of coordinates (i am not fluent in Python :upside_down_face:)

This should be very useful for creation animations. Thanks for any help :smiley:


So, we can change a 3D view by vector like this… (thanks to RIE)

I suspect that you want more control, in which case you need 3 things… An origin, a direction to look and an Up direction…

Unfortunately we can’t extract a ‘target’ from a 3D view, I don’t think… we can’t find the ‘centre’.

So if we change the direction, we will look at something else… which isn’t what you want…

For an animation, that might not be a problem, you would naturally get a location point, create your Eye, Look Direction and Up, then use the location point to create new Eye and Directions…

#From Ben Osborne

import clr

from Autodesk.Revit.DB import *

import Revit

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#we need to unwrap Dynamo 'elements'
view = UnwrapElement(IN[0])
#we need to convert Dynamo Vectors & Points to Revit XYZs
forward = IN[1].ToRevitType()
eye = IN[2].ToRevitType()
up = IN[3].ToRevitType()

#start transaction
#unlock view
#get up direction
#up = view.GetOrientation().UpDirection
#create a new orientation object based on our modified info
viewOrientation = ViewOrientation3D(eye, up, forward)
#finish transaction

OUT = view

Hope that helps,



Woooooooooow this is great, thank you! maybe you’ve got some specification with all commands and systm functions?

Umm… there’s a few places… Maybe these are useful?

1 Like