You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indranil Sinharoy edited this page Dec 20, 2015
·
19 revisions
Interacting with ZEMAX in QtConsole
The following are few screenshots that demonstrates how one may use PyZDDE to interact with ZEMAX from an IPython QtConsole interactive console.
Note that the process of creating and closing DDE link objects has been simplified. Instead of calling link = pyz.PyZDDE() and then link.zDDEInit() (as shown in the example below), you can just call link = pyz.createLink() and start using the functions related to the data items. For closing you can either use link.close() or pyz.closeLink().
The following figures have been updated to show the color coded operand and button code lists.
In [1]: importpyzdde.zddeaspyzIn [2]: # create an instance of PyZDDE objectIn [3]: ln=pyz.createLink()
In [4]: ln.zGetVersion()
Out[4]: 150624In [5]: # Load a Zemax file into the DDE serverIn [6]: ln.zLoadFile?
In [7]: