Solved

How to load a Prescription Data Report into a Matlab struct?

  • 19 May 2020
  • 1 reply
  • 162 views

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!

icon

Best answer by Victor.Haase-Coelho 19 May 2020, 15:50

View original

1 reply

 


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.

Reply