# Mirroring 3d views

**URL:** <https://forum.dynamobim.com/t/mirroring-3d-views/21507>\
**Category:** Revit\
**Tags:** revit\
**Created:** [April 30, 2018, 5:08pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507 "2018-04-30T17:08:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [April 30, 2018, 5:08pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/1 "2018-04-30T17:08:46Z")

</div>

Hello guys,  
We have been asked to mirror a project, we are ok mirroring plans, RCPs sections and elevations but do you know if there is a way to mirror 3d views and cameras???

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 1, 2018, 9:36am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/2 "2018-05-01T09:36:02Z")

</div>

Any help on this please? is it possible???

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 1, 2018, 10:20am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/3 "2018-05-01T10:20:13Z")

</div>

Hi @BIMadmin,

I didn’t try to mirror a 3D view but you could try something like in the picture.  
I’m not sure for the node boundingbox.Scale. Maybe you need to invert the bounding box in an another way.

 ![Mirror%203D%20views](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0cc37ccbeb850dc0a8db3e2eb105a9d3726ce037.png)

Let me know if it works.

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 1, 2018, 11:45am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/4 "2018-05-01T11:45:00Z")

</div>

Hello Alban, I am going to give it a go, if -1 works then the whole logic should.  
I will let you know.

Many thanks

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 1, 2018, 12:38pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/5 "2018-05-01T12:38:38Z")

</div>

Not working, I think what I need to do is mirror the camera position[Home.dyn](https://forum.dynamobim.com/uploads/short-url/z8lBSSCEw7uEmPsGN6o0sCotTDo.dyn) (13.5 KB)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/0/3009dd64db68676f0f99b519224a89ae3c6f445c.JPG)  
If in Revit we select the camera and mirror it works so that is what we need however I dont know how to access to the camera position of every 3dview…

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 1, 2018, 12:49pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/6 "2018-05-01T12:49:46Z")

</div>

Hello,  
I guess this is how…?

private void Getinfo\_View3D(View3D view3D)  
{  
string message = "View3D: ";  
// The position of the camera.  
XYZ eyePosition = view3D.GetOrientation().EyePosition;  
message += “\nCamera position: (” + eyePosition.X + ", " +  
eyePosition.Y + ", " + eyePosition.Z + “)”;

```
// Identifies whether this is a perspective view. 
if (view3D.IsPerspective)
{
    message += "\nThe view is a perspective.";
}

// The section box of the 3D view cuts the model by its bounds.
BoundingBoxXYZ sectionBox = view3D.GetSectionBox();
XYZ max = sectionBox.Max; //Maximum coordinates (upper-right-front corner of the box).
XYZ min = sectionBox.Min; //Minimum coordinates (lower-left-rear corner of the box).
message += "\nSection Box: ";
message += "\nMaximum coordinates: (" + max.X + ", " + max.Y + ", " + max.Z + ")";
message += "\nMinimum coordinates: (" + min.X + ", " + min.Y + ", " + min.Z + ")";

TaskDialog.Show("Revit",message);

```

}

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 1, 2018, 12:52pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/7 "2018-05-01T12:52:08Z")

</div>

Not sure how to implement this though and mirror.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 1, 2018, 8:49pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/8 "2018-05-01T20:49:13Z")

</div>

Hi @BIMadmin,

Boundingbox wasn’t the good clue.  
With the package Syntetic, you can do it.  
You will have to manage the vectors with your mirror axis.

 ![Mirror%20perspective%20and%20axono%20views](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/9/c9ce21216dd8efa16d5e329e464e8701b769855c.png)

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 2, 2018, 7:33am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/9 "2018-05-02T07:33:20Z")

</div>

Thanks Alban,

That looks amazing, this mirror the view orientation (Vectors), but do you know how can I move the camera to the new position???

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 2, 2018, 8:27am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/10 "2018-05-02T08:27:22Z")

</div>

Did you try the graph above ?  
It moves also the camera. (the eye position)

The -1 value is probaly not the value for your mirror axis. It makes a rotation at 180° and invert the camera and target.  
You need to determine the correct values.

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 3, 2018, 11:59am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/11 "2018-05-03T11:59:39Z")

</div>

Hello Alban,  
The vectors do change the orientation but the camera does not move at all.

 ![c1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/3225aa0603d6115b998a329c1355f3ab07ae57d6.JPG) ![c2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/b/cb7eead71ec83350c5215b1c8b0ee303d4a4aa89.JPG)

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 3, 2018, 12:00pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/12 "2018-05-03T12:00:25Z")

</div>

What I need to mirror is camera not its orientation.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 3, 2018, 12:12pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/13 "2018-05-03T12:12:49Z")

</div>

Hi Francisco,

The camera doesn’t refresh quickly after the run but it works for me.  
The node Vector.Rotate will probably help you with your axis.

Before the run :

 ![Before](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/f/6fd70eb471f3f5f8582882dcc0c7d79822e1b031.PNG)

After the run :

 ![After](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/e/fee14e7e2c7639db878f775960c4be28bbc829c0.PNG)

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 3, 2018, 12:21pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/14 "2018-05-03T12:21:20Z")

</div>

Nor sure what you mean refresh quickly, shall I closed Revit and open to see the update?  
If on the other hand I duplicate the view it does work for me. ![c3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0c49470003c6b4c351b4efb2a17b404e8f3791a8.JPG)

 ![c4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/e/fe9ded6bbaeb06168c5038495c86b420c9b3cb32.JPG) ![c5](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1bea9639c6b4f0280704a6bf29cf99ffcb45b128.JPG)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 3, 2018, 12:26pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/15 "2018-05-03T12:26:50Z")

</div>

Maybe with a node to close the transaction (Transaction.End) ?  
It’s strange because you can’t cancel the dynamo run with these particular nodes.  
 ![Cancel](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/b/eb3b8ab84b1b8f0e09be6c013e6ba2768b360fe9.jpg)

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 3, 2018, 12:31pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/16 "2018-05-03T12:31:27Z")

</div>

i checked it doesn’t work on my end, only if i duplicate the view

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 3, 2018, 9:27pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/17 "2018-05-03T21:27:01Z")

</div>

Hi @BIMadmin,

In fact, the solution is really obvious.  
The camera can be rotated or symmetrized like other elements.

 ![Mirror%20perspective%20and%20axono%20views](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7fcb8677ee8c9426a99b77ade9063185dd99695d.png)

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 4, 2018, 7:31am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/18 "2018-05-04T07:31:44Z")

</div>

This easy???  
I am going to give it a go right now!!!

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [May 4, 2018, 8:46am UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/19 "2018-05-04T08:46:11Z")

</div>

Thank you very much for your support Alban, this works!!!  
Mirror an element duplicate views, it would be amazing if I could retrieve the existing names and populate the new elements with the old names, the problem is that the node Mirror an element does not return objects so I dont know how to automate this.  
I have included in the definition a filter for only mirroring perspective views because axo views do nothing and another node for deleting the original views.  
Many thanks again. ![c1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/3/23ce65c8a0f025422dafefefc99aca7537483873.JPG)[Mirror perspective views.dyn](https://forum.dynamobim.com/uploads/short-url/gIJoHqvRvFgaXdccFBeXFffGKoG.dyn) (9.1 KB)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [May 4, 2018, 1:15pm UTC](https://forum.dynamobim.com/t/mirroring-3d-views/21507/20 "2018-05-04T13:15:11Z")

</div>

You can retrieve the newly created 3D views like this :

 ![Rename%20and%20delete](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/5/659b655a30d18c99a234ba4e367fd91816b2e05b.png)

Get 3D views script:

```
#inspired from Cesare Caoduro

import sys
import clr

pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
import os

clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.Creation import *

clr.AddReference('RevitNodes')
import Revit

clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

#Access the active document#
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

#Start a transaction on the active document#
TransactionManager.Instance.EnsureInTransaction(doc)

toggleForRefresh = IN[0]
output = []
tredView = []
tot = 0

col = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Views)

for c in col:
	if c.get_Parameter(BuiltInParameter.VIEW_TYPE_SCHEDULES).AsString() == '3D View':
		tredView.append(c.ToDSType(True))
		tot += 1

#Dispose the active transaction
TransactionManager.Instance.TransactionTaskDone()

#List outputs#
OUT = tredView

```

For your information, the axonometries own also cameras :

 ![Axonometry%20camera](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/192bbbd017c5df55e3f1db5e957bcb370f728df2.PNG)

I had fun exploring the caracteristics of 3d views ! 😀

[Mirror perspective and axono views-Rename and delete.dyn](https://forum.dynamobim.com/uploads/short-url/4GLMFYYIEND1iLJt5TzJVz47bHd.dyn) (18.6 KB)

[Next page](https://forum.dynamobim.com/t/mirroring-3d-views/21507.md?page=2)
