Solved

exporting Distortion and Prescription Data in zemax using macro

  • 28 March 2023
  • 1 reply
  • 167 views

I am trying to exprot some useful data from an optcial lens.

 

I used CFG files and MODIFYSETTINGS to extract them.

But, I could not find any keywords related the distoriton.

 

The CFG of the distoriton was found, and it was “FCD.CFG”

I tried some commands such as MODIFYSETTINGS CFG_FILE$ FCD_WAVE 1, but errors occurred.

I want some keyword for the FCD.CFG

 

I have another question about report data.

In analysis tab, there is a prescrpition report data.

There are lots of information of the lens which are very useful.

I want to save the report in ZPL.

I opend the report using OPENANALYSISWINDOW "pre".

However, i can not find any option for saving the report.

I tried it using SAVEWINDOW command, but it did not work.

 

If you have any soloution for them, please let me know.

 

Thank you.

icon

Best answer by David.Nguyen 29 March 2023, 15:34

View original

1 reply

Userlevel 7
Badge +2

Dear sh0815kang,

 

The analyses supported by MODIFYSETTINGS are documented in the Help File (F1) under: The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > MODIFYSETTINGS (keywords). Field Curvature and Distortion is not among the supported analyses, so I don’t think the commands you tried will work. However, Field Curvature and Distortion, as well as Grid Distortion, are fully implemented in the ZOS-API, meaning you can access the settings and read the results from these analyses programatically. Someone had a similar issue recently:

The code for Field Curvature and Distortion would be really similar, but let me know if you need a more specific example and I’ll be happy to help you further.

As for your second question, since those reports are text-based, you can use GETTEXTFILE:

GETTEXTFILE "filepath", Pre

I hope this helps, and take care,

 

David

Reply