GenIA for ZPL code generation

Someone recently asked me how to create ZPL code to then print labels in Tulip. Usually we either use label design software with a ZPL export, or code the ZPL code directly. As I didn’t think my answer was very good, I tested the creation of labels in ZPL format via ChatGPT, and the result is really impressive: as well as providing usable ZPL code, you can ask for explanations of the code, and even comment on the ZPL code to facilitate maintenance and modifications. It’s a simple use case, but I think it can help a lot of builders and maybe an idea for Copilot.

^XA ; Début du script ZPL
^CF0,30 ; Choix de la police (type 0) et taille (30)
^FO20,10^FD{{num_container}}^FS ; Placement du numéro de container à gauche
; FO = Field Origin (X=20, Y=10)
; FD = Field Data (données)
; FS = Field Stop (fin du champ)

^BY2,2,50 ; Paramètres du code-barres (largeur module = 2, rapport = 2, hauteur = 50)
^FO250,10^BC^FD{{num_container}}^FS ; Code-barres à droite
; BC = Code-barres 128
; FO = Field Origin (X=250, Y=10)
; Le reste est identique au texte

^XZ ; Fin du script ZPL

3 Likes

Great use of AI here @youri.regnaud! As someone without a formal coding background, using something like ChatGPT is a game changer (custom widgets is first to mind), but I never thought about using it for ZPL!

@Pete_Hartnett what do you think about this as an idea for Copilot?