Skip to main content
Question

I have Ansys zemax and can only save to .zprj file, how can I save it to .zar file so others with legacy zemax could open it?

  • 1 March 2024
  • 9 replies
  • 238 views

Those with legacy zemax cannot open .zprj file. 

9 replies

Userlevel 7
Badge +2

@icybird 

 

Its not really straightforward, but according to this post:

You can use the API to uncheck the System Explorer..Files..Is Project Directory checkbox. As far as I tested today, the checkbox remains disabled through the user interface and only responds to the API. You can use the following line of code with Python:

TheSystem.TurnOffProjectDirectory()

@Sandrine Auriol said she was going to check why the checkbox wasn’t available through the user interface with the developers.

Take care,

 

David

Userlevel 3
Badge +4

Can you describe this a bit better?  Project Directories could be zipped up and distributed such that one could redistribute the model.

Does this post imply that all the files necessary for your project are not extracted into individual files in folders like the Project Directory feature?

-B

Userlevel 7
Badge +2

@Brian.Catanzaro,

 

Project directories were introduced with 21.3 according to this article:

https://support.zemax.com/hc/en-us/articles/4407457462803-Using-Project-Directories-to-organize-OpticStudio-files

I imagine that what @icybird is saying is that they have colleagues with earlier versions of OpticStudio that they have to share their files with. And those earlier versions of OpticStudio can’t open ZOS and ZPROJ files. The solution is to use a ZAR, but if the lens file is classified as a project directory (ZPROJ), this is not possible anymore (at least without the ZOS-API trick above). I hope this helps.

Take care,

 

David

Userlevel 3
Badge +4

I do use Project Directories.  Isn’t a simple solution to just zip up the folders in the project directory?

Don’t send them the ZPROJ file, just send them a ZOS + Project folders?

-B

Userlevel 7
Badge +2

I think ZOS files were also introduced with 21.3 and are likely to be incompatible with older versions of OpticStudio. But at least, ZOS can be saved as ZMX.

Userlevel 3
Badge +4

@icybird 

I just had somebody:

  • Zip up all the project directories
  • Send a *.zos file

The entire project restored without an issue.  Good luck!

Userlevel 1

Thank you Brian and David for the helpful advice!

Userlevel 4
Badge +1

@David.Nguyen, I hadn’t thought about if the file is a project file that it will affect the ability to save to ZAR vs. ZPRJ. That is an interesting point.

Anyway, I run into this as well. I use the project files and ZPRJs frequently; however, when I need to share a ZAR with a colleague who uses an older version I simply change the file extension in the name in the dialog that opens with the “Create Archive” button under the “File” tab. The “Save as type” dialog will still show the ZPRJ but it will save it as a ZAR that can be opened by others.

Userlevel 3
Badge +2

Hi. I just like to mention that in the 2024R1.02 release we added the option to covert a file back from a Lens Project to a Lens File. This would allow the export of .ZAR files. Ansys Zemax OpticStudio 2024 R1.02 Release Notes | Zemax Community

 

Reply