Skip to content

Commit

Permalink
FIX: Improve create_report (#5546)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcapodi78 authored Dec 9, 2024
1 parent 4e678aa commit 2b04f51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/ansys/aedt/core/visualization/post/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ def create_report(
else:
report.matrix = context
elif report_category == "Far Fields":
if not context and self._app._field_setups:
if not context and self._app.field_setups:
report.far_field_sphere = self._app.field_setups[0].name
else:
if isinstance(context, dict):
Expand Down Expand Up @@ -1538,6 +1538,11 @@ def get_solution_data(
elif report_category == "Far Fields":
if not context and self._app.field_setups:
report.far_field_sphere = self._app.field_setups[0].name
if "Theta" not in report.variations:
report.variations["Theta"] = ["All"]
if "Phi" not in report.variations:
report.variations["Phi"] = ["All"]
report.primary_sweep = "Theta"
else:
if isinstance(context, dict):
if "Context" in context.keys() and "SourceContext" in context.keys():
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/visualization/post/post_common_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@ def export_model_obj(self, assignment=None, export_path=None, export_as_multiple
if not assignment:
self._app.modeler.refresh_all_ids()
non_model = self._app.modeler.non_model_objects[:]
assignment = [i for i in self._app.modeler.object_names if i not in non_model]
assignment = [i for i in self._app.modeler.object_names if i not in non_model and "PML_" not in i]
if not air_objects:
assignment = [
i
Expand Down

0 comments on commit 2b04f51

Please sign in to comment.