Skip to main content

How to create batch ZAR file quickly from zmx file in macro

  • December 4, 2019
  • 1 reply
  • 45 views

Cindy.Chen
Hello everyone, I am wondering if anyone know how to How to create ZAR file quickly from zmx file in the macro without refresh the glass catalog, thanks
Did this topic help you find an answer to your question?

1 reply

Cindy.Chen
  • Author
  • Infrared
  • 5 replies
  • December 5, 2019

Ok, problem solved. 

This macro is to cycle through all the folder and add the coating to all the lens, and then save it from zmx to zar file. The article wrote by Andrew Locke is really helpful : https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01469


  MYLENS$=$LEFTSTRING(TEMPFILE$,TempCount-4)
    Lensname$ =  MYLENS$  
     Lensname1$ = Lensname$ + ".ZAR"
   SAVEARCHIVE  Lensname1$ 

$ sign should always should behind the string when we just want name a string, $ at front of string (string functions) are only used when we need get lens name, path name etc which all well defined in the zemax manual. 


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