Skip to content

Commit

Permalink
FEAT: Add paste option (#5103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Aug 29, 2024
1 parent babac26 commit 534113b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/ansys/aedt/core/modules/post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,13 +1281,15 @@ def all_report_names(self):
return list(self.oreportsetup.GetAllReportNames())

@pyaedt_function_handler(PlotName="plot_name")
def copy_report_data(self, plot_name):
def copy_report_data(self, plot_name, paste=True):
"""Copy report data as static data.
Parameters
----------
plot_name : str
Name of the report.
paste : bool, optional
Whether to paste the report. The default is ``True``.
Returns
-------
Expand All @@ -1301,6 +1303,23 @@ def copy_report_data(self, plot_name):
>>> oModule.PasteReports
"""
self.oreportsetup.CopyReportsData([plot_name])
if paste:
self.paste_report_data()
return True

@pyaedt_function_handler()
def paste_report_data(self):
"""Paste report data as static data.
Returns
-------
bool
``True`` when successful, ``False`` when failed.
References
----------
>>> oModule.PasteReports
"""
self.oreportsetup.PasteReports()
return True

Expand Down

0 comments on commit 534113b

Please sign in to comment.