From 534113b0406dafb35fedd870ffb4ebf165eaf935 Mon Sep 17 00:00:00 2001 From: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:02:18 +0200 Subject: [PATCH] FEAT: Add paste option (#5103) --- src/ansys/aedt/core/modules/post_processor.py | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/ansys/aedt/core/modules/post_processor.py b/src/ansys/aedt/core/modules/post_processor.py index b9c3c418a94..9de451e4188 100644 --- a/src/ansys/aedt/core/modules/post_processor.py +++ b/src/ansys/aedt/core/modules/post_processor.py @@ -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 ------- @@ -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