Skip to main content
Solved

How to save an image of geometric image analysis and export cross x and y data using ZPL

  • June 20, 2023
  • 1 reply
  • 207 views

yuan.chen
Zemax Staff
Forum|alt.badge.img+3

I want to save the image simulation result and the same time, I need to export the text file of cross x and cross y data. How to do it using ZPL macro

Best answer by yuan.chen

The sample macro is attached. You need to save the config file to generate the image simulation result and the cross x and cross y. 

Here are some remarks when I wrote this macro.

  1. Be careful with the path. I spent hours on the mistake ‘’ and my colleague saved my life and nearly burnt brain. The correct one is “”. 
  2. If we export multiple datasets, it’s important to add the flag 1 in GETTEXTFILE. If the flag value is 1, then the settings provided in the settings file, if valid, will be used to generate the file. This is the same if we want to generate a cross section of image simulation. The same code is : GETTEXTFILE Filename$, Sim, IS_settingsfilename$, 1
View original
Did this topic help you find an answer to your question?

1 reply

yuan.chen
Zemax Staff
Forum|alt.badge.img+3
  • Author
  • Zemax Staff
  • 275 replies
  • Answer
  • June 20, 2023

The sample macro is attached. You need to save the config file to generate the image simulation result and the cross x and cross y. 

Here are some remarks when I wrote this macro.

  1. Be careful with the path. I spent hours on the mistake ‘’ and my colleague saved my life and nearly burnt brain. The correct one is “”. 
  2. If we export multiple datasets, it’s important to add the flag 1 in GETTEXTFILE. If the flag value is 1, then the settings provided in the settings file, if valid, will be used to generate the file. This is the same if we want to generate a cross section of image simulation. The same code is : GETTEXTFILE Filename$, Sim, IS_settingsfilename$, 1

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings