Some questions about when used the macro commnad SYSP to convert the field type

  • 16 April 2022
  • 1 reply

such as fist  type i used the filed tpye is real image height

but i want to convert the type to angle through the macro command

SYSP 100,0

however it convert result is the field type is angle but the field datas is not change

like the filed data in No. 12 is 3.4mm in real image height

but after convert the filed data in No. 12 is 3.4° in angle

i want to get the results are similar ,the field datas follws the field type



Best answer by MichaelH 18 April 2022, 21:05

View original

1 reply

Userlevel 5
Badge +2


The SYSP keyword dates back over 20 years and the Convert To feature in the Field Data Editor is a relatively new tool (about 2017-2018).  So the SYSP keyword itself would never support this type of functionality.  When the Convert To was added to the FDE, the equivalent keyword was not added to the ZPL.

The 2 options you have for programmatically converting to different field types:

  • Use the ZOS-API with the TheSystem.SystemData.Fields.ConvertToFieldType() method
  • Staying in the ZPL, use the Merit Function Editor (OPEV function) to get the appropriate “converted” ray values and then simply loop through the FDE to manually change the field values

Since the field type conversion can be a little tricky, especially if you're trying to make it robust between all the different types of field definitions, I would recommend using the ZOS-API but you could create the equivalent functionality via the ZPL as well.