Skip to main content
Solved

exporting Distortion and Prescription Data in zemax using macro

  • March 28, 2023
  • 1 reply
  • 340 views

sh0815kang

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.

Best answer by David.Nguyen

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

View original
Did this topic help you find an answer to your question?

1 reply

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1085 replies
  • Answer
  • March 29, 2023

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


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