The most common mistake people make with Extensions is forgetting to give Extensions permission to push lenses:



The other common error is to forget that the extension sees a copy of the file loaded in the editor, and that there is no reason to be restricted to only the currently loaded file: the LoadFile data item can be used to load any file irrespective of what is being edited in the user interface. In fact, any number of DDE clients can be talking to ZEMAX at any time, while a user is using ZEMAX from the normal keyboad and mouse graphical user interface. Its only when you want to see the results of the Extension program in the user interface that you need to issue the PushLens command.

One often overlooked capability of Extensions is the ability to create text and graphic data files from analysis already supported by ZEMAX by using a single call to zclient. For example, to generate a text listing of the spot diagram, use the command



The spot diagram data will be placed in the text file "OUTPUT.TXT" in the specified directory. For more information, see “GetTextFile”  and “GetMetaFile” in the Extensions chapter of the manual. However, there is no way of knowing a priori how long such a calculation will take. As stated earlier, DDE is modeled on a conversation, and if the server does not respond to a client's request within a certain time, known as the timeout period, the DDE communication is assumed to have failed. Within ZCLIENT, the timeout value is set by default to 5000 milliseconds, on line 32:

#define DDE_TIMEOUT 5000
This can be easily modified to any desired value, and then recompiled.