Skip to main content
Question

how to run Python in Zemax OpticStudio version 16

  • March 28, 2024
  • 3 replies
  • 73 views

Cheng-Mu Tsai

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

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1159 replies
  • March 28, 2024

@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

 


Cheng-Mu Tsai
  • Author
  • Student
  • 14 replies
  • March 28, 2024

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? 

 

 


jwbeenakker
  • Visible
  • 28 replies
  • March 28, 2024

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.