Orientate Multiple 3D views to a single Floor Plan view

I am trying to orientate a number of 3D views with names containing L01 to a floorplan view with the name containing L01. I started off with the graph and python script that Ben Osborne wrote a couple of years ago.
It also looks like a number of people have been looking for some sort of solution to this.

I am currently stuck with an error:
Basically saying that ‘ViewPlan’ does not have an attribute for ‘GetOrientation’.


Any thoughts? Here is the file if that helps:

Thanks in advance!!

You are inputting a list into controlview = UnWrapElement(IN[1]) so you have to loop through the list, try replacing lines 27-28:

viewSetting = controlview.GetOrientation()

with something like:

for i in controlview:
    viewSetting = i.GetOrientation()

changed those lines, and I now get this error:

@jraiten Ok I just had a better look at this - when I checked out your python error / code yesterday I was focusing on the error on the Python node (sorry for replying without looking more closely). You’re feeding the code a plan view, when it is expecting a 3D view. These lines will not work with the view or views you’re trying to input because these lines are calling attributes of the View3D Class, the views you are inputting belong to the ViewPlan class:

viewSetting = controlview.GetOrientation()

Reference the Revit API docs to see the attributes available for ViewPlan:

I recommend making one 3D view oriented to plan view, and inputting that as your control view (the IN[0] input), rather than inputting a floor plan view and having to modify that code.

Also, this part of your graph is not actually resetting anything on your graph:


@Dimitar_Venkov included that in the forum post you linked in your original post to show how implementing a boolean into a Python script works. If you edit the Python code you will see that it is just displaying a random number when you run the code. If you set the boolean to false, the random number will not regenerate, aka the code will not run.

import clr

import DSCore
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

#This will generate a random number every time you toggle the Boolean and run the graph.
OUT = DSCore.Math.Random()


I set the code to:

viewSetting = controlview.GetOrientation()

and commented out this code:

for i in controlview:
viewSetting = i.GetOrientation()

I created a new 3D view (X01_SET) to set the other 3D views to.
I changed the code to reference the 3D Set View, and it looks like my output is correct. with no error.

But, it does not set the list of views using the Set View. Nothing Actually happens.

It’s supposed to crop down to only Level 01 like the X01_SET view.

@jraiten it seems as though you are describing that you wish to modify the 3D views’ section boxes, not their orientations.

Have a look at this thread:

I realize now it actually did complete, but the only thing it did was Lock each 3D view.

In Revit, I would go to a 3D view and “right click” on the view cube and select “Orient to View” and select a floor plan view. Which in-turn takes the limits of the plan view and assigns it to the section box of the 3D View.

So in Dynamo, yes, it looks like I want to change the section box of multiple 3D views and assigned them from a Plan view (or a single 3D view)

1 Like

@jraiten have a look at the link I supplied in my previous reply, it should point you in the right direction!

1 Like

@jraiten @awilliams I am looking for the same solution, I would like to orient the 3D views to a southeast isometric view with Dynamo. It sounds simple but I don’t find the way to do it.