Hello,
The following ZPL-macro is run which performs a geometric analysis and then saves the text of this window:
OPENANALYSISWINDOW IMA, GIA_cfg_file$
n_GIA_window = WINL()
SAVEWINDOW n_GIA_window, A$
The size of the image is 125 pixels, resulting in a text file size of 400 KB
What I observed is that the time it takes to execute the SAVEWINDOW function takes a very long time of about 20 seconds (!), regardless of whether the text file is a temporary or permanent file.
The saving takes nearly as long as the execution of the image analysis.
However, if the text output of the very same “Geometric Image Analysis” window is saved manually to the very same file A$, the saving is performed in no time.
The subsequent extracting of specific strings from this text file by using OPEN, READSKIP and READSTRING is also executed within “no” time.
So my question is:
why is SAVEWINDOW so slow or more importantly: how can I significantly speed up the saving process?
Best regards,
Marcel
Zemax-Version: Ansys Zemax OpticStudio 2022 R2.02