Hi.
I am looking for an efficient way to manage large collections of user-defined apertures from the ZOS-API. As a compatible use-case, think e.g. of a database of eyewear lens shapes. The lens shapes (defined as UDAs) would ideally live in a case folder together with other information about the eyewear (think: prescription, etc.), and not in the standard folder used by Zemax.
It seems like the only file location that UDA files can be loaded from to configure a ZOSAPI.Editors.LDE.ISurfaceApertureUser
. is <Zemax>\Objects\Apertures. Passing a full path -- I am using python’s os.path.abspath()
and have also tried just the verbatim path as raw string -- to the user aperture interface’s ApertureFile
property does neither cause an error, nor result in the aperture file being used. Passing simply the name of a UDA file that is located in <Zemax>\Objects\Apertures works as it should.
The location of the “Apertures” folder can only be changed by changing the location of the “Objects” folder in the preferences, which is undesirable in my case, since other objects are commonly needed in my files at the same time and I would need to make copies of those for each case.
Is there a way to resolve this? I am using e.g. GridSag surfaces with datafiles from arbitrary locations (passed to ZOSAPI.Editors.LDE.ILDEImportData.ImportDataFile
for the GridSag surface row) and would love the same conceptual simplicity for UDAs (and potentially other object files).