Downloading files

All lens design models are in a Google Drive folers, shown at the bottom of each page. Just click on a file to download it.

Once the file is saved to your local drive, all of these files should load with no problems. Still, some people have been mentioning for quite a while that they haven’t been able to open Zemax files posted on this site. I think I finally understand the problems.

The first problem is easy to fix. If your browser doesn’t associate .zmx files with Zemax/OpticStudio, then it tries to do strange things with the file when you double-click it; my browser tries to play them as music files. To get around this problem, first download the files to your disk, then open them from Zemax or Windows Explorer.

The second problem is trickier; older versions of Zemax/OpticStudio may have problems with files saved by newer versions. From what I can tell in the comments, these problems are limited to archive files (.zar.) Zemax has helpfully investigated the issue, and their Mark Nicholson reports,

There should be no issue with opening a .ZMX file produced by the current version in any earlier version. You’ll get a message popping up to say that the file was produced with a later version and so it may contain surfaces, operands, features etc that are not available to the older version, and so care should be taken. That’s all.

ZARs are different. The ZAR is a compressed file that includes all the data files needed to open a ZMX, as well as the ZMX file. So, it includes AGF, STEP, coating files etc. There have been occasional changes to the ZAR format that render ZARs from later versions unreadable by earlier versions ... the earlier version just doesn’t know what the new version contains.

We certainly go to great lengths to ensure that any old file works 100% with any new version of Zemax software. We just can’t future-proof a version so that it can always be guaranteed to open a later version’s files satisfactorily.

The files posted here contain nothing more fancy than Even Aspheres, so I don’t understand why the files might be difficult to open.

In case anyone is still finding problems with opening the .zmx files, there are still two workarounds. One workaround is to buy a new version of Zemax/OpticStudio. A less expensive workaround is to edit the .zmx file so that the first line refers to your version of Zemax. Here are detailed instructions:

  1. Download files from this site to your hard drive

  2. Open Notepad or another text editor

  3. In Notepad, navigate to the folder where you downloaded the .zmx file

  4. In Notepad, choose “all files” from the dropdown menu next to the “filename” box.

  5. Select the .zmx file you’d like to edit

  6. See that the first line of the file contains information for the version number, coded “VERS YYMMDD NN LLLLLL” where YYMMDD is the date of the version of Zemax that created the file, NN seems to be an index for the file number, and LLLLLL is the license number for the Zemax seat that saved the file.

  7. Change the YYMMDD to the version date for your Zemax, or earlier. I’ve successfully opened files with the code 010101.

  8. Save the file with a .zmx extension by choosing “save as”, then typing the entire filename in the box, with quotation marks. Because of Windows defaults, saving as “dan.zmx” will save the file with the proper .zmx extension; but saving as dan.zmx will actually save the file as dan.zmx.txt, which may give Zemax difficulties.

What a pain, right? Hopefully no one needs to do this.