Question

how to run Python in Zemax OpticStudio version 16

  • 28 March 2024
  • 3 replies
  • 26 views

Hi, 
I have a Zemax OpticStudio version 16.
I'd like run Python in this version. 
Could anyone know how to start it?

Best Regards


3 replies

Userlevel 7
Badge +2

@Cheng-Mu Tsai 

 

Does 16 already supports the ZOS-API? In Programming.. do you have a ZOS-API Help button? If not, I think there are no official solutions to this problem. From what I remember, some people were using an independent API at the time:

https://github.com/xzos/PyZDDE

However, this isn’t supported by Zemax or Ansys and the development of this API seem to have stopped seven years ago.

Take care,

 

David

 

Hi, David, 
The version 16 has already support the ZOS-API as following figure.
When I press the Python botton, the code is very differet from the current version. 
How do I start the program in Python for version 16? 

 

 

Userlevel 3

In the past we have used (and contributed) to the PyZDDE library. But as the underlaying communication method became obsolete, it hasn’t had any updates in the last years. If you want to try to use it, I would recommend to use an earlier python version (2.7 or 3.3) as it hasn’t been tested on newer ones.

Reply