This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static void AlignViewTitle(global::Revit.Elements.Element viewport) | |
| { | |
| //get the current document (built in Dynamo method) | |
| Autodesk.Revit.DB.Document doc = DocumentManager.Instance.CurrentDBDocument; | |
| //cast the viewport to the internal Revit DB Type | |
| Autodesk.Revit.DB.Viewport internalViewport = viewport.InternalElement as Autodesk.Revit.DB.Viewport; | |
| //get the original box center (for when we re-place the viewport) | |
| var originalBoxCenter = internalViewport.GetBoxCenter(); |