Link to home
Start Free TrialLog in
Avatar of pclarke7
pclarke7

asked on

Adding DYMO Labelprinter to c# client application

Hello,
I need to update an existing WCF service to allow labels to be printed from locally attached DYMO Labelwriter 450 printers (attached by USB port to the client). In the client application I have installed the following from nuget packages.

DYMO SDK Library with default label V1.0.1
DYMO Label Framework TypeScript.Definitily.Typed V0.6.3

If I specify the code below I get a  Namespace error. I have checked the assemblies after the Nugut upload but there are no DYMO assemblies present.  What am I doing wrong. How can I get the client to recognise the DYMO Labelprinter. Appreciate any help or examples that anyone can give me.

regards
Pat
 
using DYMO;  
public void PrintLabel(string serial_num, string part_Num)
        {
            var label = DYMO.Label.Framework.Label.Open(AppDomain.CurrentDomain.BaseDirectory + "Barcode.label");
            label.SetObjectText("Bar_code", serial_num);
            label.SetObjectText("text_box", part_Num);
            label.Print("DYMO LabelWriter 450 Turbo");
        }
Avatar of Douglas Suyemoto
Douglas Suyemoto
Flag of United States of America image

If you install the DYMO label software, this will install the necessary assemblies so that you can add a reference in your project.

When you add a reference, browse to the dll located in the install directory such as "C:\Program Files (x86)\DYMO\DYMO Label Software\DLSSDKCOMLibrary.dll". Not sure which dll you need, but this should give you a good start.
Avatar of pclarke7
pclarke7

ASKER

Thanks for you comments. I installed DYMO label Software on the application server where the client software resides. In Program Files(X86)\Dymo\Dymo Label Software    DLSSDKCOMLibrary.dll was created. I then went back to Visual Studio 2015 and added a reference to DLS SDK COM Type Library. I can now enter using dymo    (lower case) but this does not allow me to reference  "DYMO.Label.Framework.Label.Open" in my c# code   as I continue to get error "the name DYMO does not exist in the current context"

After installing DYMO label Software I noticed that assemblies such as DYMO Label Framework, DYMO Label Software v.8 SDK etc... were listed but when I attempt to reference them I get the following error:

"A reference to DYMO Label Framework could not be added. The active X type library C\Program Files (x86)\DYMO\DYMO Label Software\Framework\DYMO.Label.Framework.tlb was exported from a .NET assembly and cannot be added as a reference. Add a reference to the .NET assembly instead"


System.NET 4.0.0.0 is referenced.

Any suggestions ?

thanks
Pat
ASKER CERTIFIED SOLUTION
Avatar of Douglas Suyemoto
Douglas Suyemoto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks so much.