ZPL for tilt

  • 9 September 2020
  • 4 replies

I am trying to tilt a surface by ZPL command 'SURP 10, 63, 5' to tilt the lens by 5 degree (10 is the surface number). But the lens is not tilted. Could anyone give me the clue why? Thanks!


Best answer by Hui Chen 10 September 2020, 01:00

View original

4 replies

Userlevel 4
Badge +1

Hi Zhiguang,

Thank you for your post!

I wonder after you run the ZPL command 'SURP 10, 63, 5', did you check under Surface Properties to see if the Tilt X angle is set to 5 degrees at all? If so, then the reason you don't see the 5 deg surface tilt in the Layout window is probably just due to lack of an Update All command to update the layout window. I tested this using the following macro and it worked for me as expected. 

Could you please give this a try?

Best regards,


Userlevel 1

Hi there, 

I’m trying to do the same thing, and cannot seem to get either surface in (source or detector) to tilt or decenter about any axis. I’ve used the UPDATE ALL, with no effect! I’m sure it’s something simple..  screen shot attached.





Userlevel 6
Badge +2

Hi Josh,


SURP stands for Surface properties. In Non-Sequential mode, OpticStudio uses Objects instead and corresponding ZPL keywords are SETNSCPROPERTY and SETNSCPOSITION (see Help File for more details).

If you want to change the Tilt About X of Object 1 to 50 degress, you would type:


The first number one is a surface identifier in case you are using the mixed-mode (sequential/non-sequential). Leave it to one for pure non-sequential systems.

Let me know if that helps, and take care,




Userlevel 1

Thanks so much David.. knew it had to be something simple and the thought crossed my mind that it could be something about sequential vs. non-sequential, and didn’t know where to look. Thanks again :)