Zemax Programming Language
The Zemax Programming Language (ZPL) allows users to write their own programs within Zemax. These programs can:
automate repetitive keyboard and mouse actions;
perform calculations based on Zemax data;
export data in specific formats;
produce graphs and text listings of data;
and much more!
Creating ZPL macros is easy. Our goal is to give optical engineers, who may not have much programming experience, a powerful programming tool which executes quickly and is easy to learn.
ZPL is structured like BASIC, uses commands like PRINT, FOR/NEXT and IF...THEN...ELSE, and also adds new keywords such as RAYTRACE and GETMTF that can be used to extract data computed by Zemax.
ZPL supports function calls, multi-dimensional user defined arrays, numeric and string variables, text and graphical output, and a simple interface to the ray tracing algorithms.
Related Knowledge Base articles:
What is ZPL?
How to Automate Keyboard and Mouse Actions with ZPL
How To Write Your Own Optimization Operand
How to Create a User-Defined Solve