A new method based on Dynamic Data Exchange (DDE) technology for computer-aided alignment is put forward in this
paper. It is adopted to realize the automatic data transferring between Matlab and Zemax optical software. Based on the
analysis of CAA and its procedure, a self-made program is developed to perform all the CAA steps under Matlab
environment. Flow process of this program is shown in this paper. A Gregorian system is adopted as an example to verify
the feasibility of the program. Comparisons of the image quality between the misaligned system and the post-aligned
system are presented. Results show that this program is very effective.