The ZEMAX Programming Language offers great user-extensibility to ZEMAX.  ZPL macros can be used to perform any number of tasks and are very useful in automating a series of evaluations.  Some of the basics of ZPL are as follows:

  • These ZPL capabilties are separated into two main categories: functions and keywords.  Functions can be used on the right hand side of an assignment, and will return a value or string.  Keywords are used to directly program flow, and may be used to set values in the lens prescription.
  • Macros must be saved with an appropriate filename, with a .ZPL extension. 
  • Macros should be saved in the ZEMAX>Macros directory so that they may be called from within ZEMAX


References

ZEMAX Optical Design Program User's Guide, ZEMAX Development Corporation