PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → Dymo labelwriter; OLE, DDE or DLL.
Dymo labelwriter; OLE, DDE or DLL.
Iniciado por Frans, fev., 04 2004 5:39 PM - 4 respostas
Publicado em fevereiro, 04 2004 - 5:39 PM
Hello,
Does anybody have a (simple) example of the use of a Dymo labelwriter?
What can I use best; OLE, DDE or DLL.

Regards, Frans
Publicado em fevereiro, 04 2004 - 6:26 PM
??? No, I think what you need is
either
a windows printer driver for your printer. You should have received one together with your printer or you should be able to download one from many sites. Use google Printing from WinDev will be done by use of iPrint() and related commands. RTFM .. However, most windows drivers for label printers are faulty and do not work properly with handshaking signals on the serial or parallel interface and will, rather sooner than later, scramble lables or stop with an error. This will happen, whenever you try to print dozens of different labels on the printer.
or
a programming handbook, which tells you the generic commands available for the printer. Write an e-mail to Dymo support, most probably they can lead you to the programmer's manual for your printer or send one in pdf-format. Problem: You have to learn how to use the printer with its various commands AND you have to handle the serial or parallel interface on your own. Be warned, makers of label printers frequently use non-standard cables and non-standard handshaking!
Regards,
Guenter
Hello,
Does anybody have a (simple) example of the use of a Dymo labelwriter?
What can I use best; OLE, DDE or DLL.

Regards, Frans
Publicado em fevereiro, 04 2004 - 7:36 PM
Thank you for your reaction.
I think I did not fully inform you. Dymo has a program that you can handle with OLE, DDE or DLL. Then it has many advantages over a normal printer driver. You can directly print labels etc and turn and change the label.
Regards Frans.
Hello,
Does anybody have a (simple) example of the use of a Dymo labelwriter?
What can I use best; OLE, DDE or DLL.

Regards, Frans
Publicado em fevereiro, 04 2004 - 8:20 PM
Hey Frans,
I have made an litle interface to send data to a Dymo labelwriter.
The interaction is based on OLE.
Herewith some code as a example.
EXTERN TEKST1
EXTERN TEKST2
EXTERN TEKST3
EXTERN TEKST4
EXTERN TEKST5
EXTERN TEKST6
EXTERN TEKST7
EXTERN TEKST8
EXTERN TEKST9
DymoAddIn, DymoLabels is object OLE dynamic
LabelFile is string
q is Variant
FileID is int
ReadRes, s_tekst is string
DymoAddIn = GetActiveObject("DYMO.DymoAddIn")
DymoLabels = GetActiveObject("DYMO.DymoLabels")
IF DymoAddIn = Null THEN
DymoAddIn = new object automation "DYMO.DymoAddIn"
END
IF DymoLabels = Null THEN
DymoLabels = new object automation "DYMO.DymoLabels"
END
LabelFile = "C:\Program Files\DYMO Label\Label Files\SL-Bakery.LWL"
DymoAddIn>>open(LabelFile)
FileID = fOpen("C:\SAPP\TEMP\Etiket.txt", foReadWrite)
IF FileID <> -1 THEN
LOOP
ReadRes = fReadLine(FileID)
IF ReadRes = EOT OR ReadRes = "" THEN BREAK
s_tekst = ExtractString(ReadRes,1,";")
s_tekst = ExtractString(ReadRes,2,";")
s_tekst = ExtractString(ReadRes,3,";")
s_tekst = ExtractString(ReadRes,4,";")
s_tekst = ExtractString(ReadRes,5,";")
DymoLabels>>SetField("TEKST1", ExtractString(ReadRes,1,";"))
DymoLabels>>SetField("TEKST2", ExtractString(ReadRes,2,";"))
DymoLabels>>SetField("TEKST3", ExtractString(ReadRes,3,";"))
DymoLabels>>SetField("TEKST4", ExtractString(ReadRes,4,";"))
DymoLabels>>SetField("TEKST5", ExtractString(ReadRes,5,";"))
DymoLabels>>SetField("TEKST6", ExtractString(ReadRes,8,";"))
DymoLabels>>SetField("TEKST7", ExtractString(ReadRes,10,";"))
DymoLabels>>SetField("TEKST8", ExtractString(ReadRes,7,";"))
DymoLabels>>SetField("TEKST9", ExtractString(ReadRes,11,";"))
q = DymoAddIn>>Print(1,True)
END
END
Kind regards,
Freddy Baert
Member of the Belgium-Netherlands Windev usergroup.

Hello,
Does anybody have a (simple) example of the use of a Dymo labelwriter?
What can I use best; OLE, DDE or DLL.

Regards, Frans
Publicado em fevereiro, 09 2004 - 2:08 PM
Hello Freddy,
This works fine. Thank you
Regards Frans

Hey Frans,
I have made an litle interface to send data to a Dymo labelwriter.
The interaction is based on OLE.
Herewith some code as a example.
EXTERN TEKST1
EXTERN TEKST2
EXTERN TEKST3
EXTERN TEKST4
EXTERN TEKST5
EXTERN TEKST6
EXTERN TEKST7
EXTERN TEKST8
EXTERN TEKST9
DymoAddIn, DymoLabels is object OLE dynamic
LabelFile is string
q is Variant
FileID is int
ReadRes, s_tekst is string
DymoAddIn = GetActiveObject("DYMO.DymoAddIn")
DymoLabels = GetActiveObject("DYMO.DymoLabels")
IF DymoAddIn = Null THEN
DymoAddIn = new object automation "DYMO.DymoAddIn"
END
IF DymoLabels = Null THEN
DymoLabels = new object automation "DYMO.DymoLabels"
END
LabelFile = "C:\Program Files\DYMO Label\Label Files\SL-Bakery.LWL"
DymoAddIn>>open(LabelFile)
FileID = fOpen("C:\SAPP\TEMP\Etiket.txt", foReadWrite)
IF FileID <> -1 THEN
LOOP
ReadRes = fReadLine(FileID)
IF ReadRes = EOT OR ReadRes = "" THEN BREAK
s_tekst = ExtractString(ReadRes,1,";")
s_tekst = ExtractString(ReadRes,2,";")
s_tekst = ExtractString(ReadRes,3,";")
s_tekst = ExtractString(ReadRes,4,";")
s_tekst = ExtractString(ReadRes,5,";")
DymoLabels>>SetField("TEKST1", ExtractString(ReadRes,1,";"))
DymoLabels>>SetField("TEKST2", ExtractString(ReadRes,2,";"))
DymoLabels>>SetField("TEKST3", ExtractString(ReadRes,3,";"))
DymoLabels>>SetField("TEKST4", ExtractString(ReadRes,4,";"))
DymoLabels>>SetField("TEKST5", ExtractString(ReadRes,5,";"))
DymoLabels>>SetField("TEKST6", ExtractString(ReadRes,8,";"))
DymoLabels>>SetField("TEKST7", ExtractString(ReadRes,10,";"))
DymoLabels>>SetField("TEKST8", ExtractString(ReadRes,7,";"))
DymoLabels>>SetField("TEKST9", ExtractString(ReadRes,11,";"))
q = DymoAddIn>>Print(1,True)
END
END
Kind regards,
Freddy Baert
Member of the Belgium-Netherlands Windev usergroup.

Hello,
Does anybody have a (simple) example of the use of a Dymo labelwriter?
What can I use best; OLE, DDE or DLL.

Regards, Frans