diff --git a/src/Libraries/RevitNodes/Elements/InternalUtilities/ElementWrapper.cs b/src/Libraries/RevitNodes/Elements/InternalUtilities/ElementWrapper.cs index 3b74f5f1e..f70b65d39 100644 --- a/src/Libraries/RevitNodes/Elements/InternalUtilities/ElementWrapper.cs +++ b/src/Libraries/RevitNodes/Elements/InternalUtilities/ElementWrapper.cs @@ -152,14 +152,14 @@ public static WallType Wrap(Autodesk.Revit.DB.WallType ele, bool isRevitOwned) public static View3D Wrap(Autodesk.Revit.DB.View3D view, bool isRevitOwned) { - if (view.IsPerspective) + if (!view.IsTemplate) { - return PerspectiveView.FromExisting(view, isRevitOwned); - } - else - { - return AxonometricView.FromExisting(view, isRevitOwned); + 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) diff --git a/test/Libraries/RevitIntegrationTests/SelectionTests.cs b/test/Libraries/RevitIntegrationTests/SelectionTests.cs index e1ed76ad9..0412cc7aa 100644 --- a/test/Libraries/RevitIntegrationTests/SelectionTests.cs +++ b/test/Libraries/RevitIntegrationTests/SelectionTests.cs @@ -425,8 +425,8 @@ public void DynamoAllSelectionNodeTests_WithPreSelectedEntities() ViewModel.OpenCommand.Execute(testPath); // check all the nodes and connectors are loaded - Assert.AreEqual(35, model.CurrentWorkspace.Nodes.Count()); - Assert.AreEqual(18, model.CurrentWorkspace.Connectors.Count()); + Assert.AreEqual(38, model.CurrentWorkspace.Nodes.Count()); + Assert.AreEqual(20, model.CurrentWorkspace.Connectors.Count()); AssertNoDummyNodes(); @@ -446,7 +446,7 @@ public void DynamoAllSelectionNodeTests_WithPreSelectedEntities() var floor = GetPreviewValueAtIndex(allElementAtLevelNodeID, 2) as Revit.Elements.Floor; Assert.IsNotNull(floor); - // ElementsOfCategory & Categories, as output of Categories + // ElementsOfCategories & Adaptive Points, as output of Categories // passed to ElementsOFCategory var elementsOfCategoryNodeID = "24f225e1-8883-48c3-a8ba-773b2734336c"; AssertPreviewCount(elementsOfCategoryNodeID, 22); @@ -456,6 +456,11 @@ public void DynamoAllSelectionNodeTests_WithPreSelectedEntities() Assert.IsNotNull(refPt); } + // ElementsOfCategories & Views, as output of Categories + // passed to ElementsOFCategory + var elementsOfViewNodeID = "2569434a-b34f-4512-a4fe-f065c7a10175"; + AssertPreviewCount(elementsOfViewNodeID, 33); + // ElementsOfFamilyType & Family Type, as FamilyType output passed to // ElementsOfFamilyTypes node. var elementsOfFamilyTypeNodeID = "657017f1-4775-4daa-b00e-8d85392be6b5"; diff --git a/test/System/Selection/DynamoAllSelectionNodeTests.dyn b/test/System/Selection/DynamoAllSelectionNodeTests.dyn index e1bb0e85f..1d4e69c50 100644 --- a/test/System/Selection/DynamoAllSelectionNodeTests.dyn +++ b/test/System/Selection/DynamoAllSelectionNodeTests.dyn @@ -1,33 +1,41 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - + - + @@ -37,50 +45,92 @@ - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file