Solved

Ansys Zemax cannot use *.ZMX child files for OFH

  • 16 February 2023
  • 2 replies
  • 98 views

Userlevel 3
Badge

Michael Cheng provides a great how-to when using optically fabricated holograms (OFH). I downloaded the associated zip file from his post (here). The files are saved in the ZMX format. When you load the playback ZMX file, it will throw an error message saying that it can’t find the construction files even though they are correctly named in the comment line of the LDE. It appears that the reason is because they are saved as ZMX files and not the newer ZOS file. It appears that this is recent change since as I don’t remember having this issue before I installed the Ansys version of Zemax OpticStudio (currently running 2022 R2.02). I guess this is a bug; however, I don’t know that for certain.

Is there a reason that Zemax can’t use the ZMX format for the OFH surface?

(Update 1, 2023-02-20): I have done a fresh install and now Zemax is asking for the ZMX format instead of the ZOS format when I load and OFH playback file. I have tried toggling the default file format between ZOS and ZMX; however, this does not change anything. So it seems that Zemax can use the ZMX format for the construction files; however, it can’t look for both ZOS and ZMX and how to tell it which one to look for is still unknown.

(Update 2, 2023-02-20): At least part of the issue appear to be saving the files on a server as opposed to saving them locally. Update 1 is resolved by opening the files from the local hard drive instead.

icon

Best answer by Sean Turner 28 February 2023, 14:43

View original

2 replies

Userlevel 3
Badge +1

I noticed this behavior as well and opened up a ticket with tech support last September. After a few emails back and forth, this was the final reply.

We went ahead and looked into this issue in a bit more detail and found an interesting behavior. If the ZAR file is unpacked (Restored into the same directory) and opened, the error message occurs. Also if we open up the master file normally, after it is unpacked. However, as soon as we save the master as a .ZOS file (and subsequently also the two constructions file are duplicated as ZOS files) the error message does not occur anymore. 
 
So I think there is nothing wrong with your file at all. More likely in the source code of Zemax OpticStudio itself we have the issue (Since the introduction of ZOS), that the OFH does not properly call the second construction file anymore.
 
I will go ahead and file a Bug report. Until this is fixed, please use the workaround which I have just described above.

Userlevel 6
Badge +2

This bug has been fixed and the fix will be available in the coming release 23R2 in July.

Reply