Skip to main content
Solved

about macro getmtf

  • February 10, 2021
  • 1 reply
  • 284 views

Hi, I want to do a loop to get a lot of MTF curves. How do I do with GETMTF?


I know how to run it in a single time, but if I want to change object distance every time and rerun the GETMTF,


how should I do the loop? How to set object distance at ZPL macro?


Thanks a lot. 

Best answer by Berta.Bernad

Hi Weihua,


You can set object distance (and another properties of surfaces) with the keywords SETSURFACEPROPERTY/SURP


The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETSURFACEPROPERTY, SURP



And then use a FOR loop to change it. The sintax for FOR loops is the following: 


FOR variable, start_value, stop_value, increment


(commands)


NEXT


So something like this will change the object distance from 10 to 100 with an increment of 10 and retrieve the MTF:


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

1 reply

Berta.Bernad
Zemax Staff
Forum|alt.badge.img+2
  • Zemax Staff
  • 112 replies
  • Answer
  • February 11, 2021

Hi Weihua,


You can set object distance (and another properties of surfaces) with the keywords SETSURFACEPROPERTY/SURP


The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETSURFACEPROPERTY, SURP



And then use a FOR loop to change it. The sintax for FOR loops is the following: 


FOR variable, start_value, stop_value, increment


(commands)


NEXT


So something like this will change the object distance from 10 to 100 with an increment of 10 and retrieve the MTF:



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