Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Syncing Camera Positioning

5 ANTWORTEN 5
GELÖST
Antworten
Nachricht 1 von 6
dustina
1582 Aufrufe, 5 Antworten

Syncing Camera Positioning

I have a project with multiple 3D views. Each view has three identical views corresponding to existing, demolition and new construction phases. I am trying identify if there is a known work flow for syncing camera views. Essentially, I want to update the camera angle in the New Construction views and have them ripple throughout the existing and demolition. 

 

Thanks,

 

Dustin 

5 ANTWORTEN 5
Nachricht 2 von 6
Alan.johnson1970
als Antwort auf: dustina

I don't think you can do that.

 

AJ.
Nachricht 3 von 6
ToanDN
als Antwort auf: dustina

You can copy paste camera from one plan view to another plan view but it will create a new 3d view, not update the old one.  So it is easier to duplicate one view and change phase/phase filter to create others.

 

Nachricht 4 von 6
dustina
als Antwort auf: ToanDN

Appreciate the response, however trying to avoid the need to replace the views on sheets with updated views. Given the quantity of views I am dealing it could be quite time consuming to always replace the views every time I need to slightly tweak the camera view. 

Nachricht 5 von 6
ToanDN
als Antwort auf: dustina

Well, you can just open the 3d view you want to fix the camera angle, right click on the view cube, choose orient to view, and pick the 3d view with the correct camera angle.

Nachricht 6 von 6
DanielKP2Z9V
als Antwort auf: dustina

I got something similar working from C# - synchronizes all currently opened 3d views and also works with other view types (plans, elevations, sections etc.). If syncing 3d views it only "pans" and "zooms", but doesn't rotate yet. Also syncing 2d views with 3d works well, but not the other way around yet. Also doesn't handle sheets yet (not sure how it would work, perhaps only if a view was activated).

 

 

using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System.Collections.Generic;
using System.Linq;

namespace scripts
{
    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class SynchronizeSelectedViews : IExternalCommand
    {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            Document doc = commandData.Application.ActiveUIDocument.Document;
            UIDocument uidoc = commandData.Application.ActiveUIDocument;

            View activeView = doc.ActiveView;
            UIView activeuiView = uidoc?.GetOpenUIViews()?.FirstOrDefault(item => item.ViewId == uidoc.ActiveView.Id);

            // Get the corners of the current UIView
            IList<XYZ> corners = activeuiView.GetZoomCorners();
            XYZ topLeft = corners[0];
            XYZ bottomRight = corners[1];

            // Loop through all other open UI views and move them to the same position
            foreach (UIView otherUIView in commandData.Application.ActiveUIDocument.GetOpenUIViews())
            {
                if (otherUIView.ViewId != activeView.Id)
                {
                    if (!(doc.GetElement(otherUIView.ViewId) is ViewSheet))
                    {
                    otherUIView.ZoomAndCenterRectangle(topLeft, bottomRight);
                    }
                }
            }

            return Result.Succeeded;
        }
    }
}

 

 

 

 

 

 

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report