Solved

ZPL language question

  • 31 May 2021
  • 1 reply
  • 299 views

Hi


This Shayne from Clouldight, Vincent's colleague.


I would like to know how to use operand of ZPL 'SPRO' . Is it same as SETSURFACEPROPERTY, SURP?


Thanks!


Sincerely,


Shayne

icon

Best answer by Csilla Timar-Fulep 1 June 2021, 15:15

View original

1 reply

Userlevel 5
Badge +2

Hello,


Thanks for your question here on the MyZemax forums!


SPRO() is a numeric macro function, so it will return the surface properties, but it will not make any changes.

In order to pull the surface property you are interested in, you will need to input the surface number and the code for the specific surface property:


The codes for the surface properties are same as for the SETSURFACEPROPERTY keyword.

The difference is that SETSURFACEPROPERTY is a keyword, which means it will not only report the value, but it will make changes to the system.


You may read more about the differences of functions and keywords in this kowledgebase article:

Introduction to Zemax Programming Language (ZPL) · MyZemax


I hope this helps, but if you have any further questions, please do not hesitate to ask!


Best,

Csilla

Reply