The ZEMAX.CFG file, located in the main ZEMAX directory, serves as the main configuration file which describes the user-selected options on the environment dialog box, or the File > Preferences dialog.  Any user-preferences which are applied using this dialog are saved to this configuration file.  It is important to note that this configuration file, or any other configuration file, is NOT overwritten by ZEMAX upon a new installation.  Therefore, you may install newer updates of ZEMAX on top of the existing version on your computer without affecting any of your preferences, whether they be color assignments, button bar arrangements, or saved settings within the analysis features themselves.

Configuration files are also vital to the way some optimization operands work.  Some operands, such as IMAE and POPD, use the saved settings (from the lens-specific configuration file or the last globally saved settings) to perform the calculation.  The main reason for this is because these complex analysis features require many different setting options, not all of which can be presented in the Merit Function Editor.  Therefore, in order to properly use these operands, the corresponding analysis feature must first be opened, the settings be modified, and the SAVE button be pressed.

In addition to optimization operands, some ZPL keywords rely on the use of the configuration files.  For example, the GETTEXTFILE keyword (which creates an ASCII text file from any ZEMAX analysis window which supports text) calls for a “settingsfilename.”  The settingsfilename is the configuration file which ZEMAX will use for the default settings of the desired analysis feature.  For more details, please refer to the discussion of the GETTEXTFILE keyword in the ZEMAX Programming Language chapter of the ZEMAX User’s Guide.