I am following the example (CSharpStandalone_04_pull_data_from_FFTMTF.cs) to get FFT MTF data like below;
newWin.ApplyAndWaitForCompletion();
IAR_ newWin_Results = newWin.GetResults();
It works fine in my computer. But the same copy returns ‘null results’ from other’s computer.
No idea where I should look into for debugging.
Appreciate your kind advice.
Page 1 / 1
Ah, I thought the GetResults() was giving an error (I couldn’t remember off the top of my head if the null is on GetResults or ApplyAndWaitForCompletion when running and analysis in the wrong mode).
I didn’t realize it’s the GetDataSeries(). This means that the analysis didn’t complete and there was an error. For example, if you don’t load the correct system and you’re working off the default Lens.zmx file with only 3 surfaces and no Entrance Pupil, you get a dataSeries == null and you get the following error in the GUI:
Since the error will be more detailed in the GUI, I would suggest adding the following line after the ApplyAndWaitForCompletion() then open the file and check the error:
I think this is because the system on your coworker’s computer by default is non-sequential. The ZOS-API has a check to see if TheSystem is sequential, non-sequential or both. If TheSystem is non-sequential, even if it’s a new system (this comes from either the default Lens.ZMX file or the Setup > Project Preferences > General > Change Startup Defaults button), then sequential analysis will return null.
Can you try calling the following command before you open up the analysis:
TheSystem.MakeSequential();
If this doesn’t work, can you upload more of your code?