Solved

ZOS API and Python

  • 26 September 2019
  • 4 replies
  • 204 views

Userlevel 1
Hi,



I have few questions regarding Using ZOS API with Python.



There seem to be two packages to do this, PyZDDE  and PyZOS, what is the difference, and which should be used?



Are there any tutorials for this or for ZOS API Programming in General?



Georg
icon

Best answer by Chris Normanshire 27 September 2019, 13:06

View original

4 replies

PyZDDE is a toolkit written by a user to provide a link using the old DDE extensions. The DDE stuff is deprecated now, which means that old code still works, but you should not use it for new projects. ZOS API replaces the older DDE capability.



There are about 20 Python-ZOSAPI examples that ship with OpticStudio, plus KB articles. Try this one to get you started: https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01620 
Userlevel 1
Thanks.



Are there any examples for "PyZOS " somewhere?



It seems more compftable to use, then doing it the standard way.



But the but I can't really find a documentation about the functions included.



 
Userlevel 3
Badge +2
The best place to begin if you are new to the ZOS-API is our 'Getting started with ZOS-API' learning path. You can access this from our new learning paths page (https://my.zemax.com/en-US/learning-paths/). As you work through this series of articles and videos you'll learn the how to connect using Python (or MATLAB, C#, C++, Mathematica), fundamentals of ZOS-API structure and syntax, how to get the most out of the ZOS-API help documentation, and more. There are also Python specific examples included.



As the PyZOS toolkit was not created by Zemax we don't have any examples of its use.
Userlevel 3
Badge +2

Reply