Skip to main content
Solved

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

  • May 19, 2020
  • 1 reply
  • 206 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!

Best answer by Victor.Haase-Coelho

 

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.

View original
Did this topic help you find an answer to your question?

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings