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:
- For the full Merit Function value:
MFCN()
- 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!
Best,
Allie
It might be that the Tolerancing Script is more helpful to you than ZPL if you want to automate tolerancing.