Orient an existing 3D view in a Revit project to an isometric direction

Hello all,

I would like to orient an existing 3D view in a Revit project to an isometric southeast direction, for example, as the Home Orientation of the view cube of a 3D view.

It looks simple in Revit but I don’t find the way to do it using Dynamo.

If found the custom node “3DView Set Orientation” in the Package geniusloci, it works but I have to use an existing view as a reference to replicate the same orientation to a list of different 3D views. That means that I have to edit manually the orientation of one 3D view in Revit to make it work.

How can I set from Dynamo the orientation of a 3D view as the available in Revit: Orient to Direction, Orient to View, Orient to Plane…?

This node says it is based of the Ben Osborne script:

#From Ben Osborne

import clr
from Autodesk.DesignScript.Geometry import 

import Revit

import Autodesk

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

The entries made in this node are stored as a list in the IN variables.
doc = DocumentManager.Instance.CurrentDBDocument

def ProcessList(_func, _list):
    return map( lambda x: ProcessList(_func, x) if type(x)==list else _func(x), _list )

def Unwrap(item):
    return UnwrapElement(item)

if isinstance(IN[0], list):
    controlview = ProcessList(Unwrap, IN[0])
    controlview = [Unwrap(IN[0])]

if isinstance(IN[1], list):
    views = ProcessList(Unwrap, IN[1])
    views = [Unwrap(IN[1])]

for control in controlview:
	viewSetting = control.GetOrientation()
for view in views:

#Assign the output to the OUT variable.
OUT = (controlview,views)

If somebody knows the solution it would be very helpful.



use the Revit lookup add-in to see what the parameters are for the :
XYZ eyePosition,
XYZ upDirection,
XYZ forwardDirection

Create a ViewOrientation3D with these parameters, set them to the view you desire.
Adjust accordingly. The control cube option will automatically adjust the distance to accommodate for the object (building) size, at least it did in my tests.

This may be what you need

1 Like