Specifying a UDA file to a Surface Aperture as an Aperture file using Python
Hello Everyone,
I am trying to change the Aperture file of a surface aperture using python. All I could do is to change the Aperture type to User Aperture but the Aperture file is not specifyed.
Using Matlab, it is working perfectly using the same code and also, it works that I can change the Aperture file manually in zemax so this means the aperture uda file is at the correct location with the correct content.
I also tried to change the filename string to the full directory of the uda file and it is not working too.
tMod note: moved to more appropriate forum for ZOS-API related discussions.]
Page 1 / 1
Hi Baraka,
I had to modify your code a little bit because Surface_3 isn’t defined, but other than that it works fine for me on Python 3.8.13 and Pythonnet 2.52. Could you check and tell us your version of Python and Pythonnet? There have been issues with more recent versions of Pythonnet lately.
The code I used with a default lens file is the following: