Skip to main content

HI,

Does anyone know if the following : 

singleTrace = ZOS.Z_Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.RayTrace);

singleTrace.GetResults().IsValid

can be used as the error code for the single ray tracing? just like the error code returned in the batch ray tracing?

Thanks!!

The GetResults().IsValid is a generic property for all results stating whether the analysis was able to run to completion; it does not consider any of the information inside the results themselves.  So, this does not tell you if there is a ray tracing error or vignetting no a specific surface.  

The 2 options to determine the error code for a single ray trace will be:

  • Use the SingleRayNormUnpol() method under the IBatchRayTrace interface (tool = TheSystem.Tools.OpenBatchRayTrace(); tool.SingleRayNormUnpol();)
  • Save the results from the AnalysisIDM.RayTrace and manually parse the text

The first option has 8 inputs and 13 outputs; two of the direct outputs are errorCode (which tells you which surface the ray trace engine mathematically could not trace past) and vignetteCode (which tells you which surface the ray is vignetted at).  From an API standpoint, the first option is better.


Reply