Skip to content

Commit

Permalink
Merge pull request DynamoDS#1999 from ksobon/3dview-wrapper-2018
Browse files Browse the repository at this point in the history
3dview wrapper 2018
  • Loading branch information
ZiyunShang committed Aug 14, 2018
1 parent 36e53b8 commit 535c8ba
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 535c8ba

Please sign in to comment.