Skip to main content

ZOS-API interface 2025 R1

Example 03: Open File and Optimize

Last update: 17.07.2025

Ex 3: An API file (…\Samples\API\[language]\e01_new_file_and_quickfocus.zos) is opened, and some surfaces and radii are made variable. A merit function which constrains air and material thicknesses, and targets astigmatism and coma, is generated manually by inserting operands and adjusting parameter values. The local optimizer is run to completion, and then the hammer optimizer is run for 10 seconds.

Input:      API\[language]\e01_new_file_and_quickfocus.zos

Output: API[language]\e03_open_file_and_optimise.zos

C#

C++

Mathematica

Matlab

Python

Connect with Ansys