Skip to main content

Typically I would only save the Zemax file as below for later use

TheSystem.SaveAs(r"C:\Path\To\Save\MyLens.zmx")

Is there a way to save the Zemax file as a Lens Project to a folder? With all the dependencies pointed to the folder root? Such as: GLASSCAT, COATING, CONFIG, etc.?

Thanks

This is done at the IOpticalSystem level, so if you want to set a file as a project directory, you should use:

TheSystem.ConvertToProjectDirectory(folder_path)
print(TheSystem.IsProjectDirectory)

If you want to turn off the project directory, you can use:

TheSystem.TurnOffProjectDirectory()

 


@MichaelH Nice! But once I save the system to Project Directory - how do I set all dependencies/sources to the Lens Project Root Folder? 
Similar to this action in  the GUI.

 

-Asuku


Reply