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

View3D wrapping 2015 #1245

Merged
merged 2 commits into from
Sep 1, 2016
Merged
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 @@ -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)
Expand Down
11 changes: 8 additions & 3 deletions test/Libraries/RevitIntegrationTests/SelectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,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();

Expand All @@ -442,7 +442,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);
Expand All @@ -452,6 +452,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";
Expand Down
Loading