Skip to main content
Solved

ZPLM uncorrectly read by merit function

  • May 9, 2023
  • 2 replies
  • 131 views

Audrey L

Hello,
 

I created a ZPL (ZPL02.zpl), it seems to work if I run it directly through Programming>Edit/Run, but not inside the merit function.

PRINT "worst case : ", worst_color

OPTRETURN 0, worst_color

Those two lines do not give the same value. The first one gives a correct value. In addition, when I call this ZPL through the merit function, it does not update the output value.
What should I do?
Thanks in advance for your help,
 

 

Best answer by Audrey L

It appears that zpl called by merit function open macros in the directory\MACROS where you are actually working, and not on the Zemax\MACROS directory as for the ZPL you are running from the Programming tab.

2 replies

Audrey L
  • Author
  • Single Emitter
  • May 11, 2023

I should also add, that it appears that the merit function does not see a saved modification set in the ZPL. It keeps the definition the way it was first used.

It looks that Zemax need to be reloaded.


Audrey L
  • Author
  • Single Emitter
  • Answer
  • May 11, 2023

It appears that zpl called by merit function open macros in the directory\MACROS where you are actually working, and not on the Zemax\MACROS directory as for the ZPL you are running from the Programming tab.