Dear all,
in progress of fully automating my data export for my customized documentation, I am trying to access the data generated by the Zemax analysis windows by a standalone API application in python. While this works for most of the analysis, I am having trouble to get data from the vignetting window for further processing by using the GetResults() function. There is not data retrieved. Debugging shows, that there is indeed no data listed in the respective item.
I double checked by exporting the data to a text file - this is also empty with respect to data.
My Code therefore (simple example based on the available python api example 1) works as follows:
vig = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.VignettingDiagramSettings)
vig.WaitForCompletion()
vig.ToFile(sampleDir + '\\API\\Python\\TextResults.txt')
However, when I save the lens file, and reopen with a Zemax Instance, the vignetting window is displayed correctly and the text-form thereof shows data as it should.
I attach the python code file, which works when started from the API samples folder (C:\Users\UserName\Zemax\ZOS-API Sample Code\Python) after having run sample 1.
I there a bug in my procedure or is this just not working for this specific type of analysis?
Thank you very much for your help!