This article explains:
The sample file can be downloaded from the last page of the article.
The tolerance report text window shows the value of the tolerancing criterion merit function for the nominal system, each perturbed system value, and for each Monte Carlo file produced. The report can also include any operand value by using the tolerance script, and it is easy to build up tables of output data to give a detailed breakdown of system performance for each tolerance or Monte Carlo file
Open the attached sample file. 
The surface #1 radius of curvature is toleranced using the TRAD operand in the Tolerance Data Editor. 
Let us say that as well as listing the RMS spot value, we also want to list the effective focal length of the lens during the tolerancing procedure. Open the merit function for this design. It is built using a default merit function tool, and measured the RMS spot radius of the lens at the image surface. Note that it also has the EFFL (effective focal length) operand with zero weight in line #1. Because this operand has zero weight, it will not affect the tolerancing results, but its value can be easily reported in the tolerance listing.
The Merit Function in the sample file was built assuming rotational symmetry, which is fine in this case since we are only tolerancing the radius or curvature. If we were to tilt and/or decenter the lens, the default merit function cannot be built assuming rotational symmetry.
Place the included EFFL.tsc tolerance script file in the root ZEMAX directory. 
The COMP 2 0 command sets the thickness of surface #2 as compensator; it will be optimized during tolerancing to minimize the criteria. Since no Merit Function file is loaded in the script, the current Merit Function will be used for tolerancing (RMS spot radius). The compensator will be adjusted (optimized) to minimize the merit function, and then the value of operand 1 (EFFL) will be reported.
Run the tolerance under Tools > Tolerancing >Tolerancing with following options. 
The script will be executed 3 times when performing sensitivity analysis; one for the nominal system, and once for the radius of surface 1 perturbed to its minimum and maximum tolerance values.
The tolerance report will show the three EFFL operand values. 
The tolerance script can also be used to simulate complex alignment process. This will be discussed in detail in a separate article in a near future.
Tolerance scripts are simple to write and very flexible. Please see Chapter 16 of the manual, Tolerancing, and the section "Using Tolerance Scripts" for full details.