Skip to content

Commit d0c7d47

Browse files
ZiyunShangAndyDu1985
authored andcommitted
Revert "3dview wrapper 2017" (#2285)
1 parent f5df0b9 commit d0c7d47

File tree

10 files changed

+531
-568
lines changed

10 files changed

+531
-568
lines changed

src/Libraries/RevitNodes/Elements/InternalUtilities/ElementWrapper.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Autodesk.DesignScript.Runtime;
33
using Autodesk.Revit.DB;
44
using Revit.Elements.Views;
5-
using AbstractView3D = Revit.Elements.Views.AbstractView3D;
5+
using View3D = Revit.Elements.Views.View3D;
66

77
namespace Revit.Elements
88
{
@@ -151,14 +151,16 @@ public static WallType Wrap(Autodesk.Revit.DB.WallType ele, bool isRevitOwned)
151151
return WallType.FromExisting(ele, isRevitOwned);
152152
}
153153

154-
public static AbstractView3D Wrap(Autodesk.Revit.DB.View3D view, bool isRevitOwned)
154+
public static View3D Wrap(Autodesk.Revit.DB.View3D view, bool isRevitOwned)
155155
{
156-
if (view.IsTemplate)
157-
return Revit.Elements.Views.View3D.FromExisting(view, isRevitOwned);
158-
if (view.IsPerspective)
159-
return PerspectiveView.FromExisting(view, isRevitOwned);
160-
161-
return AxonometricView.FromExisting(view, isRevitOwned);
156+
if (!view.IsTemplate)
157+
{
158+
if (view.IsPerspective)
159+
return PerspectiveView.FromExisting(view, isRevitOwned);
160+
else
161+
return AxonometricView.FromExisting(view, isRevitOwned);
162+
}
163+
return null;
162164
}
163165

164166
public static Element Wrap(Autodesk.Revit.DB.ViewPlan view, bool isRevitOwned)

0 commit comments

Comments
 (0)