Skip to main content

Ignore errors in ZPL

  • October 30, 2020
  • 1 reply
  • 186 views

Forum|alt.badge.img

Is there a way to ignore errors while running a ZPL, and keep it running?


I have a ZPL that opens files and some files come up with the following error.


 


Zemax Error Message


Cannot determine object coordinates!


OK


I select OK and the ZPL can continue running.


But since I am running through many files this comes up often and doesn't continue until I select OK.


Is there a way to ignore these errors and allow a ZPL to continue running? Without having to select OK each time?


Thank you,


 


 

Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+2

Hello Roger


No unfortunately there is no way to ignore the error messages in ZPL. It is quite a basic programming language. 


What you can do instead is add some error handling line in your code to avoid these error messages, so find the conditions that cause the errors. This can be done through the use of an IF statement. We have some examples of this in the Knowledgebase article “How to write a ZPL macro: Computing Zonal Transverse Chromatic Aberration.” 


Another solution would be to avoid updates, to avoid errors and only update when necessary. The keywords SUSPENDUPDATES and RESUMEUPDATES can be used for that purpose.


Let me know if that helps and do not hesitate if you have any further questions.


Sandrine


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings