ARUP.IssueTracker.Revit.RevitWindow.doOpen3DView C# (CSharp) Method

doOpen3DView() private method

Open a 3D View
private doOpen3DView ( VisualizationInfo v ) : void
v VisualizationInfo
return void
    private void doOpen3DView(VisualizationInfo v)
    {
        try
        {
            UIDocument uidoc = uiapp.ActiveUIDocument;
            Document doc = uidoc.Document;

            if (uidoc.ActiveView.ViewType == ViewType.ThreeD)
            {
                View3D view3D = (View3D)uidoc.ActiveView;
                if (view3D.IsPerspective) //ORTHO
                {
                    MessageBox.Show("This operation is not allowed in a Perspective View.\nPlease close the current window(s) and retry.",
                        "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning);
                    return;
                }

            }
            m_Handler.v = v;

            //var touple = GetViewCoordinates(doc, v);
            //if (touple == null)
            //{
            //    MessageBox.Show("Viewpoint not formatted correctly.", "Viewpoint Error", MessageBoxButton.OK, MessageBoxImage.Error);
            //    return;
            //}

            //m_Handler.touple = touple;

            m_ExEvent.Raise();
        }
        catch (System.Exception ex1)
        {
            TaskDialog.Show("Error!", "exception: " + ex1);
        }
    }