Skip to content

Commit

Permalink
Merge pull request #2114 from ZiyunShang/master
Browse files Browse the repository at this point in the history
Merge pull request #1999 from ksobon/3dview-wrapper-2018
  • Loading branch information
AndyDu1985 authored Aug 14, 2018
2 parents 329347a + 535c8ba commit ee08f39
Show file tree
Hide file tree
Showing 10 changed files with 568 additions and 531 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 View3D = Revit.Elements.Views.View3D;
using AbstractView3D = Revit.Elements.Views.AbstractView3D;

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

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

return AxonometricView.FromExisting(view, isRevitOwned);
}

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

0 comments on commit ee08f39

Please sign in to comment.