ipzCaptureWindow returning incorrect window
robmarkcole opened this issue · 2 comments
I think this issue is related (or exactly the same as) the issue #74.
But thanks to your images (from which I got to know what version of Zemax/OpticStudio you are using) which gave me a clue. I think I know what the problem is (and perhaps you could also verify).
Just a little background:
The function ipzCaptureWindow()
internally uses the function zGetMetaFile()
to get an image of the specified analysis window from Zemax, converts it in a png image and displays it.
When Zemax introduced the modern OpticStudio (version 14.0 onward I think), they decided to deprecate few data-items including GetMetaFile
. Therefore, technically, in OpticStuido version 14.0 and above it is not even possible to use the ipzCaptureWindow()
.
Present problem:
It seems to me that in the latest (or some release down the line), it became possible (either by some error in Zemax's side) to call the dataitem GetMetaFile
without an error. Furthermore, in my tests I found out that OpticStudio is outputting the layout window irrespective of the analysis code.
Therefore this is a really a bug in OpticStudio and not in PyZDDE.
I also tested in older Zemax (version 13), and the functions--ipzCaptureWindow()
and zGetMetaFile()
work as expected.
I guess that we will need to report to Zemax for this problem.
Happy to perform any additional tests you propose.
I agree this is likely a problem for Zemax to resolve