Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #1999 from ksobon/3dview-wrapper-2018 #2290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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