Trouble using Dymo SDK

I am trying to implement the Dymo SDK for printing labels on Dymo printers. An earlier app I created for printing on a Dymo printer downloaded an image to the printer and it worked fine. But I wasn’t printing barcodes. Even with the MBS barcode routines, the printed image is nowhere near as clear and crisp as when printed from the Dymo 8 program that comes with the printer. There is a solution based on an Access Example from the SDK docs that works, but not well in that it it does not recognize most of the objects on more complicated labels than a simple address label.

[quote=275107:@Dennis Hoskins]Dennis Hoskins 1 Jul 2016
The Dymo SDK is an interface to the Dymo Label software. The software has some features such as automatically generating and printing the IMDB postal barcode for an “address” field placed on the label design. It can also auto fit the address to the label. For my present needs, no need to re-invent the wheel with Xojo code.

I continued to experiment and discovered that the Invoke method was the problem. The following test code worked perfectly:

Dim DymoAddIn As OLEObject
Dim DymoLabel As OLEObject

DymoAddIn = New OLEObject(“Dymo.DymoAddIn”)
DymoLabel = New OLEObject(“Dymo.DymoLabels”)

If DymoAddIn = Nil Or DymoLabel = Nil Then
MsgBox(“Unable to create OLE Objects”)
End

Dim f As String = “E:\Users\dgh\Documents\DYMO Label v.8 SDK” + _
“\DLS SDK\Samples\High Level COM\MS Access\Address (30252, 30320, 30572).LWL”
DymoAddIn.Open(f)

Dim label As String = “John Doe” + EndOfLine + _
“123 Main Street” + EndOfLine + _
“Anytown, NJ 00000”
DymoLabel.SetField(“Address”, label)

DymoAddIn.StartPrintJob
DymoAddIn.Print(1, True)
DymoAddIn.EndPrintJob[/quote]

I found a VB.Net example and tried implementing it but ran into a problem I can’t solve. I imported DYMO_DLS_SDK which comes with the free Dymo 8 program. Based on the VB example I entered

Dim myDymo As new DYMO_DLS_SDK.DymoHighLevelSDK Dim dyAddin As new DYMO_DLS_SDK.ISDKDymoAddin Dim dyLabel As DYMO_DLS_SDK.ISDKDymoLabels
Every time I try to create an instance of dyAddin or dyLabel, I get an error. There are no such properties in DYMO_DLS_SDK.DymoHighLevelSDK. The properties are in another class DYMO_DLS_SDK.IDymoHighLevelSDK, but that class is protected. Presumably, that class is loaded when the constructor runs, but the compiler does not let me get that far.

The VB.Net code is

[quote]Dim myDymo As DYMO_DLS_SDK.DymoHighLevelSDK
Dim dyAddin As DYMO_DLS_SDK.ISDKDymoAddin
Dim dyLabel As DYMO_DLS_SDK.ISDKDymoLabels

Set myDymo = New DYMO_DLS_SDK.DymoHighLevelSDK

Set dyAddin = myDymo.DymoAddin
Set dyLabel = myDymo.DymoLabels[/quote]

I assume you downloaded the latest SDK? The docs seem pretty straight forward.

If Dennis’ code works for connecting to the OLE object it shouldn’t be that much work to expand it out for extra functionality.

IDymoLabels.GetObjectNames will return a list of objects.

If you look in “DYMO Label v.8 SDK\DLS SDK\Samples\High Level COM\dotNET Samples\VB Sample” there’s code showing the calls for the VB example which should be pretty straight forward to following if you can read Xojo.

I can’t help any further I’m afraid as I only have a zebra printer here, not a dymo :frowning: When I did it for the zebra many years ago, I just talked to the thing directly via RAW print commands, I dont know if dymo can do that but it will be reinventing the wheel if they have a nice sdk already made :slight_smile:

Hmm, there’s a DYMO Label Framework JavaScript Library 2.0 Open Beta that you can send TCP commands to, this might be worth checking if you dont get anywhere. I cant find a protocol spec for it though and they have obfuscated their javascript just to be proper killjoys.

Hmmm, amazon have a Dymo LW 450 on a deal at the moment, tempted :smiley:

When I worked with dymo printers, we found that the issue had to do with the ppi of the images that we were sending to the printer. Make sure that the image resolution matches the printer exactly to avoid any scaling artifacts and your black and white pictures should work just fine.

FWIW, we were doing postage labels for USPS, UPS and FedEx.

Hi Dean,

I got that Dymo LW 450 after, sorry it took me a while to get back here, I was a bit busy with other things.

Using the dymo label software, I created a blank label with a barcode object on it positioned as I wanted and called it BARCODE (right click properties)

I saved it, then used the following code to call it, and everything worked perfectly.

[code]Dim DymoAddIn As OLEObject
Dim DymoLabel As OLEObject

DymoAddIn = New OLEObject(“Dymo.DymoAddIn”)
DymoLabel = New OLEObject(“Dymo.DymoLabels”)

If DymoAddIn = Nil Or DymoLabel = Nil Then
MsgBox(“Unable to create OLE Objects”)
End

Dim f As String = “C:\Users\Julian\Documents\DYMO Label\Labels\MultiPurpose11355-DYMO Barcode.label”
DymoAddIn.Open(f)

Dim label As String = “ABCDE”
DymoLabel.SetField(“BARCODE”, label)

DymoAddIn.StartPrintJob
DymoAddIn.Print(1, True)
DymoAddIn.EndPrintJob[/code]

I hope that helps or I hope you have it sorted by now.

Feel free to PM me if you are still having troubles.

The zebex scanner and powerscan m8300 I have on my desk here for testing worked perfectly with the scan.

PS. The SDK wasn’t needed, after testing the above I uninstalled it and ran the test again and it worked perfectly, as expected.

If you’re getting instantiation problems with the Dymo objects, try installing the Dymo Label software first?

[quote=362601:@]Using the dymo label software, I created a blank label with a barcode object on it positioned as I wanted and called it BARCODE (right click properties)

I saved it, then used the following code to call it, and everything worked perfectly.[/quote]
@ : your code above works fine, except the fact that it takes about 10 seconds before I get the labels out.
When clicking the Print button in the Dymo software, it starts printing immediately.
My question: did you experience the same ?

It takes about 1 second on my computer.