ZPL commands for sensitivity analysis

  • 30 September 2020
  • 2 replies

I’m interested in automating a couple of simple steps using ZPL. I don’t find a reference table of the names of different parameters in ZPL in the Help.


How do I print a particular merit function result e.g. CENX at a particular station, and how do I change the value of a Coordinate Break’s “Decenter X” or “Tilt X” etc.?

2 replies

Userlevel 6
Badge +2

Hi Minosha,

Commands in the ZPL are split into two general groups: functions (commands which GET data) and keywords (commands which SET data). All ZPL commands are provided in the Help System file 'The Programming Tab > About the ZPL' which is found under the Programming tab:



For extracting Merit Function data, you will use a Numeric Function. There are a few options you could use here:

  1. For the full Merit Function value: MFCN()

  2. For the value of a particular operand: OCOD and OPEV or OPEW. These are discussed in detail in the KBA 'How to obtain the value for any optimization operand in a ZPL macro using OPEV and OPEW.'

To change the value of a parameter of a surface, you will use a Keyword. In this case, you will use the keyword SETSURFACEPROPERTY aka SURP. This keyword accepts a few inputs:



In the Help System file 'The Programming Tab > About the ZPL > KEYWORDS (about the zpl) > SETSURFACEPROPERTY, SURP' we see that the code for a particular parameter value is '10:'



Knowing that Decenter X is parameter #1 for a Coordinate Break, the command to alter the Decenter X of surface #5 so that it is equal to -8 will be:


SURP 5, 10, -8, 1


I recommend utilizing that About the ZPL Help System file as it includes detailed information about all keywords and functions!



Userlevel 7
Badge +3

It might be that the Tolerancing Script is more helpful to you than ZPL if you want to automate tolerancing.