GETTEXTFILE writes empty file randomly

  • 25 June 2020
  • 3 replies
  • 101 views

I am running Zemax OpticStudio 19.4 SP2 on Windows 10. When I run the following line in a loop in a macro, randomly, some of the files are empty. The non-empty files are correct. 


GETTEXTFILE OUTPUT_PSF_FILE$, Hps, CFG_FILENAME$, 1


Please help!


 


Thanks,


 


 


Qiang


3 replies

Userlevel 5
Badge +2

Hello Qiang,


Thanks for your post here!


I have looked into this issue, but I could not reproduce your problem. I also increased the sampling so that it takes a long time to save to verify your problem.


To investigate this issue further, I would like to get some additional information from you. Could you please answer the questions below:



  1. Is it just one specific file giving you problems?

  2. What settings are you using in the configuration file?

  3. How many files are you creating? What size do they have?

  4. Could you please share your system prefereably as a ZAR file so that we can try to run the macro at our end?

    If you don't want to share your file in the forum, you can either email it to support@zemax.com, or create a case in MyZemax and attach the file there.


Hope to hear from you soon so we can get this figured out!


Kind regards,


Csilla


 

Hi Csilla,


Here are the replies.



  1. Is it just one specific file giving you problems?

    1. No. It happened at random times. Now is the time it does not work.



  2. What settings are you using in the configuration file?

    1. I tried on two different lens configuration files and they all behave the same way now. But the way, it was not like this 2 weeks ago. COVID-19 issue?



  3. How many files are you creating? What size do they have?

    1. The macro is trying to create 526+ files and each one is 418KB. But the empty file happened just after a few files were created and again it is random. I can run the macro twice and mostly of the time I will have all the non-empty files between the two runs.



  4. Could you please share your system prefereably as a ZAR file so that we can try to run the macro at our end?

    1. I will share privately.

      If you don't want to share your file in the forum, you can either email it to support@zemax.com, or create a case in MyZemax and attach the file there.




Thanks,


 


 


 


Qiang

Userlevel 5
Badge +1

Hi Qiang,


Thanks for your follow-up post here! I just wanted to drop a message here to let you know we've received your file and will be investigating deeper. Thanks for sending that along. We'll be following up with more details through that avenue.


To keep the conversation more general here on the forum, we do have a handy Knowledgebase article here which discusses some techniques in debugging your ZPL macros. It discusses details like defining a 'control' to turn a pseudo-debugging mode on/off to check your macro output among other best practices.


Thanks again, and we'll be in touch!


~ Angel

Reply