An application for Zemax that enables advanced analysis of optical systems through direct access to their parameters via DDE (Dynamic Data Exchange).
Working with Zemax via DDE
Dynamic Data Exchange (DDE) is a Windows interprocess communication protocol that enables data exchange between applications. Two applications can establish a DDE link:
- Server (Zemax in this case) - provides data
- Client (your application) - requests and receives data
Zemax implements a DDE server interface, allowing external applications to access optical design data and functionality.
This project is a DDE client that:
- Establishes DDE connection with Zemax as server
- Sends data requests (e.g., optical system parameters)
- Receives and processes responses from Zemax
For complete DDE command reference, see "Chapter 28: ZEMAX EXTENSIONS" in official Zemax documentation.
Pre-built binaries for Windows are available on the Releases page.
- Release builds — stable, tested versions.
- Dev builds — test builds with new or experimental features not yet included in a release (may be unstable).
💡 Each build includes two versions:
– Release — for regular use,
– Debug — with console output and extended logging for debugging.
Both share the same build number for easy comparison.
You can launch the application in two ways: via Zemax’s Extensions menu or by running the executable directly.
This method integrates the application into Zemax’s Extensions menu for convenient access.
- Launch Zemax
- Open the Extensions menu (default hotkey
F11) - From the list, select an executable file named like:
ZemaxDDEClient_*.exe
💡 Zemax scans the
Extendfolder inside its installation directory (typicallyC:\Program Files\Zemax\Extend\) and displays all.exefiles from it in the Extensions menu. To make the application permanently available, place your executable in this folder.
You can run the executable directly without adding it to Zemax.
- Launch Zemax
- Run the
ZemaxDDEClient_*.exefile - Click the Connect to Zemax button in the Sidebar window
- MSYS2 with MinGW-w64 toolchain
- CMake (≥ 3.16)
- GLFW:
pacman -S mingw-w64-x86_64-glfw - Zemax (acts as a DDE server once running)
This project uses the following third-party libraries:
- Dear ImGui by Omar Cornut — Immediate Mode GUI
- ImPlot by Evan Pezent — 2D plotting library for Dear ImGui
- Native File Dialog (NFD) by Michael Labbe — Cross-platform file dialogs
- Clone the repository:
git clone --recurse-submodules https://github.com/d3m37r4/ZemaxDDEClient.git cd ZemaxDDEClient - Install MSYS2 and dependencies:
pacman -Syu pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw cmake
- Fetch the submodules (if not cloned with --recurse-submodules):
git submodule update --init --recursive
- Set up environment in Git Bash:
export PATH=/c/msys64/mingw64/bin:/c/msys64/usr/bin:$PATH export LIBRARY_PATH=/c/msys64/mingw64/lib:$LIBRARY_PATH export CPLUS_INCLUDE_PATH=/c/msys64/mingw64/include:$CPLUS_INCLUDE_PATH
The project uses CMake for reliable builds. For convenience, it is recommended to use the build.sh wrapper script.
# Make the build.sh file executable
chmod +x build.sh
# Build the Release version (used by default)
./build.sh
# Build the Debug version (with visible console and DEBUG_LOG enabled)
./build.sh debug
# Build with optimization: -O2
./build.sh optimize=1
# Build with maximum optimization: -O3
./build.sh optimize=2
# Debug build with -O2 optimization (example of combining arguments)
./build.sh debug optimize=1
# Clean the build directory
./build.sh clean
# Build with a fixed timestamp — for stable artifacts in CI and automation
BUILD_TIMESTAMP=1766073737 ./build.sh releaseManual build via CMake (if fine-grained control or debugging of the build process is needed):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildThis project is licensed under the MIT License.
If you have any thoughts, bug reports, or suggestions to improve the product, please contact me at one of the following places:
You can also submit a pull request.