The Zemax Programming Language (ZPL) allows users to write their own programs within OpticStudio.
These programs can:
and much, much more!
Creating ZPL macros is easy, this learning path provides all the necessary information to get you up and running with this simple yet powerful programming language.
Get Started:
This is an introduction to the Zemax Programming Language (ZPL) for first time users. It provides an overview of the key ZPL features, as well as examples of variables and description of the most important functions and keywords.
Introduction to Zemax Programming LanguageThis lesson will teach you how to use the Zemax Programming Language (ZPL) to create a macro calculating and plotting the zonal transverse chromatic aberration (ZTCA) of a system. After explaining the basic algorithm to be used, the article describes how the macro can be generalized to allow for a more flexible use, including user input and error trapping.
How to write a ZPL macroThis lesson explains how ZPL macros can be used to define complex optimization targets in the Merit Function Editor through use of ZPLM optimization operand. As an example, the we describe how ZPLM can be used to constrain the center of mass of a system to ensure it is correctly balanced.
ZPLM: optimization using a ZPL Macro