Added Model/Profile/Elevation_VIEW context as default for new projects #2784

Default Model/Profile/Elevation_VIEW context could be helpful to make openings created with BIM tool more correct.
This commit is contained in:
Andrej730
2023-02-21 11:46:05 +05:00
parent 66b7692227
commit d4bbb6e2c7
2 changed files with 12 additions and 0 deletions
@@ -53,6 +53,9 @@ def create_project(ifc, project, schema=None, template=None):
project.run_context_add_context(
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent=model
)
project.run_context_add_context(
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent=model
)
plan = project.run_context_add_context(context_type="Plan", context_identifier="", target_view="", parent=0)
project.run_context_add_context(
context_type="Plan", context_identifier="Axis", target_view="GRAPH_VIEW", parent=plan
+9
View File
@@ -56,6 +56,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")
@@ -116,6 +119,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")
@@ -185,6 +191,9 @@ class TestCreateProject:
project.run_context_add_context(
context_type="Model", context_identifier="Annotation", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Model", context_identifier="Profile", target_view="ELEVATION_VIEW", parent="model"
).should_be_called()
project.run_context_add_context(
context_type="Plan", context_identifier="", target_view="", parent=0
).should_be_called().will_return("plan")