Skip to main content

Is there a way to get the Prescription Data Report using the Matlab ZOS_API?

I've been trying:

prescriptionData = ZOSAPI.Analysis.AnalysisIDM.PrescriptionDataSettings;

But that seems to return an 'AnalysisIDM' object.

My goal is to have the Prescription data as a struct but just a text file like the Report generated from the Analyze Tab would be great.

Thank you for your time!

 

The solution I used:

TheSystem = app.PrimarySystem;
prescriptionReport = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.PrescriptionDataSettings);
prescriptionReport.ApplyAndWaitForCompletion();
prescriptionResults = prescriptionReport.GetResults();
prescriptionResults.GetTextFile(System.String.Concat(strcat(filesDir, strcat('PrescriptionDataReport_',file,'.txt'))));

This is pretty much copied from Example 10.

I can then open the text file from within Matlab.

Please let me know if there is a better way.