Skip to main content

Hello,



I would like to raytrace in SQ mode and check vignetted surface number .



In ZPL, RAYTRACE Hx,Hy,Px,Py ; RAYV() ;



In ZOS-API-Python, I would like to perform the command content above.



But I don't know how to use  RayInfo.Vignetted in ZOS-API_Python.(Error Code:instance property must be accessed through a class instance)



Do you know how to solve this problem?



Thank you



 



Hideki Nishioka

Hi Hideki,



This is because RayTrace has fully-implemented settings, but not fully-implemented results (have a look at this post). Therefore, it doesn't have RayData, and that is why you get this error.



Usually, when this is the case, you can use the GetTextFile method of the IAR_ result interface to write the results to a text file. This corresponds to the text tab often found in the analysis windows, which doesn't exist for the Single Ray Trace. Have a look at this knowledgebase article for more information.



Then, you'll need to parse this text file, which contains a column Comment. This column will have the word Vignetted written at the corresponding surface.



Alternatively, you could use the BatchRayTrace tool, which is used to launch multiple ray traces, but works fine with a single ray as well. The advantage is that is has a slightly more user-friendly results.



I hope this helps.



Take care,



David


Reply