Skip to content

Commit

Permalink
FIX: Get scale settings with multiple designs in the same project (#5144
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lorenzovecchietti authored Sep 11, 2024
1 parent 634988a commit 3f78101
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Binary file modified _unittest/example_models/T98/transient_fs.aedtz
Binary file not shown.
8 changes: 6 additions & 2 deletions _unittest/test_98_Icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,9 @@ def test_80_global_mesh_region(self):
assert g_m_r.global_region.object.material_name == "Carbon Monoxide"

def test_81_transient_fs(self, add_app):
app = add_app(application=Icepak, project_name=transient_fs, subfolder=test_subfolder)
app = add_app(
application=Icepak, project_name=transient_fs, subfolder=test_subfolder, design_name="IcepakDesign1"
)
fs = app.post.create_field_summary()
for t in ["0s", "1s", "2s", "3s", "4s", "5s"]:
fs.add_calculation("Object", "Surface", "Box1", "Temperature", time=t)
Expand All @@ -1879,7 +1881,9 @@ def test_81_transient_fs(self, add_app):
app.close_project()

def test_82_folder_settings(self, add_app):
app = add_app(application=Icepak, project_name=transient_fs, subfolder=test_subfolder)
app = add_app(
application=Icepak, project_name=transient_fs, subfolder=test_subfolder, design_name="IcepakDesign2"
)
plot_object = app.post.create_fieldplot_surface(
assignment=app.modeler["Box1"].faces[0].id, quantity="Temperature"
)
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/generic/load_aedt_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def _walk_through_structure(keyword, save_dict, design_name=None):
_count += 1
continue
# end_key is found
if end_key == line:
if end_key == line and design_found:
break
# between begin_key and end_key
if found:
Expand Down
6 changes: 5 additions & 1 deletion src/ansys/aedt/core/modules/solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,11 @@ def _parse_folder_settings(self):
Returns:
FolderPlotSettings or None: An instance of FolderPlotSettings if found, otherwise None.
"""
folder_settings_data = load_keyword_in_aedt_file(self._postprocessor._app.project_file, "FieldsPlotManagerID")
folder_settings_data = load_keyword_in_aedt_file(
self._postprocessor._app.project_file,
"FieldsPlotManagerID",
design_name=self._postprocessor._app.design_name,
)
relevant_settings = [
d
for d in folder_settings_data["FieldsPlotManagerID"].values()
Expand Down

0 comments on commit 3f78101

Please sign in to comment.