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
  • 7 replies
  • 143 views

Userlevel 1

Those with legacy zemax cannot open .zprj file. 


7 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!

Reply