Skip to content

Commit

Permalink
Revert "Merge pull request #1999 from ksobon/3dview-wrapper-2018" (#2282
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ZiyunShang authored and AndyDu1985 committed Dec 10, 2018
1 parent 5b4937c commit 7550073
Show file tree
Hide file tree
Showing 10 changed files with 531 additions and 568 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Autodesk.DesignScript.Runtime;
using Autodesk.Revit.DB;
using Revit.Elements.Views;
using AbstractView3D = Revit.Elements.Views.AbstractView3D;
using View3D = Revit.Elements.Views.View3D;

namespace Revit.Elements
{
Expand Down Expand Up @@ -151,14 +151,16 @@ public static WallType Wrap(Autodesk.Revit.DB.WallType ele, bool isRevitOwned)
return WallType.FromExisting(ele, isRevitOwned);
}

public static AbstractView3D Wrap(Autodesk.Revit.DB.View3D view, bool isRevitOwned)
public static View3D Wrap(Autodesk.Revit.DB.View3D view, bool isRevitOwned)
{
if (view.IsTemplate)
return Revit.Elements.Views.View3D.FromExisting(view, isRevitOwned);
if (view.IsPerspective)
return PerspectiveView.FromExisting(view, isRevitOwned);

return AxonometricView.FromExisting(view, isRevitOwned);
if (!view.IsTemplate)
{
if (view.IsPerspective)
return PerspectiveView.FromExisting(view, isRevitOwned);
else
return AxonometricView.FromExisting(view, isRevitOwned);
}
return null;
}

public static Element Wrap(Autodesk.Revit.DB.ViewPlan view, bool isRevitOwned)
Expand Down
Loading

0 comments on commit 7550073

Please sign in to comment.