Skip to main content

In ZOS-API what functions do we use to open an archive file and select the same options as the interface?


To reproduce this, I have connected OpticStudio Interactive extension to Matlab :


>> TheApplication=ans;

>> TheSystem=TheApplication.PrimarySystem;

>> ZAR_Tools=TheSystem.Tools.OpenRestoreZAR;

>> OpenStatus = ZAR_Tools.SetFileName('E:\Zemax\Samples\Sequential\Objectives\Double Gauss 28 degree field.zar');

>> ZAR_Tools.SetFilesAllOverwrite();

>> ZAR_Tools.GetOutputFolder

ans =

E:\Zemax\SAMPLES

>> ZAR_Tools.SetOutputFolder('E:\Zemax\Samples\Sequential\Objectives');

>> ZAR_Tools.RunAndWaitForCompletion();

>>

 


So the main point to know is that IRestoreArchive is an interface that can be accessed from the IOpticalSystemTools interface, so with this line:


>> TheSystem=TheApplication.PrimarySystem;

>> ZAR_Tools=TheSystem.Tools.OpenRestoreZAR;

 


Reply