Hi,
I'm running into a problem with the NSC detector viewer combined with the ZOSAPI and CAD-object as detector. I can succesfully built and trace my Zemax models using the ZOSAPI in non-sequential mode. However, I would like to have the output of the detector viewer text tab (Irradiance + x,y,z)
This is where my problem arises. I can open the Detector viewer through the API, but since I do not have a standard detector, I can only get output in the text-tab. When I call DetectorView.Results.GetTextFile() after running the DetectorViewer, the resulting text file shows 'incoherent data' (I assume since I call it while the viewer is on the graph tab).
Now when I connect as extension and click the `text` tab myself within OpticStudio, and then call DetectorView.Results.GetTextFile(), the file is correct.
As I would like to run many of these analyses, I would like to automate obtaining the detector viewer results. Is there a way to change tabs through the ZOS-API? Or a workaround like making the Text tab the default tab?
Thank you in advance!