Could anyone help troubleshoot an error when running the NSC RayTrace in Interactive Extension mode from Matlab - ‘Unrecognized field name "ClearDetectors".’?
The code always runs the first time through, and then the second time through the below routine, either in the same program execution or after stopping and starting again, it hangs up on NSCRayTrace.ClearDetectors(0);
% Ray Trace
% Create ray trace
NSCRayTrace = TheSystem.Tools.OpenNSCRayTrace();
NSCRayTrace.SplitNSCRays = false;
NSCRayTrace.ScatterNSCRays = false;
NSCRayTrace.UsePolarization = true;
NSCRayTrace.IgnoreErrors = true;
NSCRayTrace.SaveRays = false;
NSCRayTrace.SavePaths = true;
NSCRayTrace.SavePathsFile = 'Simulation_temp.PAF';
NSCRayTrace.ClearDetectors(0);
% Run ray trace
NSCRayTrace.RunAndWaitForCompletion();
NSCRayTrace.Close();
The code was working most of the time, occasionally generating the error and was was sort of ignorable / manageable, through restarting Matlab and OS. Now it consistently generates the error and stops program execution every second and further time through the routine and is an obstacle to moving forward.
Any thoughts?