PyAEDT "export_report_to_csv" does not work

Kris169
Kris169 Member Posts: 1 ✭✭

Hello,

I'm automating some processes in Ansys Electronics and want to export the reports from my simulations to a .csv file. I used the code i wrote for that several times over the last weeks and everything was fine. however yesterday and today the exact same code doesn't seem to work on the same pc. I also tried it on two other seperate pcs.

All i get is the error: "Plot Export: Cannot open C:/ANSYS/Automation/Reports/Slot_24_Pol_16/Drehmoment_0rpm.csv for writing. (10:45:18 AM May 08, 2025)"

Although the code is exactly the same as in the last weeks when it was working, i tried to change the path several times but nothing works. I got the admin rights on all three pcs i tried this on. Also i tried using "export_report_to_file" with ".csv" and ".tab" data files but this doesn't work either.

Manually export a .csv file from my reports does work. But when i record a Script while doing that and try to run this code via Python with
"reports = self.m3d.odesign.GetModule("ReportSetup")" and
"reports.ExportToFile("Drehmoment_0rpm", f"C:/ANSYS/Automation/Reports/Slot_{Nutzahl}Pol{Polzahl}/Drehmoment_0rpm.csv", False)" it also doesn't work.

Does anyone know why this error accures? Thanks in advance