Results 1 to 6 of 6

Thread: Dymo Barcode label printing from WebApp (Intranet) howto...

  1. #1
    Join Date
    Feb 2009
    Location
    Adelaide, South Australia
    Posts
    2,863

    Cool Dymo Barcode label printing from WebApp (Intranet) howto...

    Hi Guys

    Just tackled something that I thought would be tricky but actually was reasonably simple and works great.

    Environment; WebApp 19 server with users in intranet. Store label needs to be printed:
    1. On creation of a new part record,
    2. On button press on ZoomPart.wo,
    3. On Barcode scanner scan (for replace label),
    4. On mobile phone for 'missing label'.


    I decided to get the Dymo Label Maker Wireless for the following reasons
    - Fast enough for my customers need (about 1 sec process time + 1 sec printing per label)
    - Wireless, so network linked to the server (instead of USB headaches) while can be next to the user or be taken to the store room (Please note it does not have a battery, so does still need the power pack plugged in)
    - Good labels including Solvent/Oil resistant 'durable series', with extra stickyness

    To do the software side, no SDK download required. Just:
    - Install the Dymo Label App (DLS8Setup.8.7.3.exe at this stage) on the webApp server
    - Add Dymo to the network (instructions are in the box and quite simple via Access point and your phone).
    - Run Dymo Add printer utility on the server
    - Run Dymo Label v8, to design a label layout and name each text/barcode/image object, save in your .\Reports directory or so (It is an XML file so good for version control).
    - In DataFlex Create Class / Import COM automation / Browse 'C:\Program Files (x86)\DYMO\DYMO Label Software\DLSSDKCOMLibrary.dll"
    - Create your own class like mine below

    Code:
    Use cIniFile.pkg
    Use DLSSDKCOMLibrary.pkg
    
    
    Struct tStoreLabel
        String PartNo
        String Group
        String Bin
        Integer BinCol
        Integer BinShelf
        String Barcode
        String Desc
    End_Struct
    
    
    Class cDymoAddIn is a cComDymoAddIn
        Procedure Construct_Object
            Forward Send Construct_Object
            Set peAutoCreate to acAutoCreate
        End_Procedure
    End_Class
    
    
    Class cDymoLabels is a cComDymoLabels
        Procedure Construct_Object
            Forward Send Construct_Object
            Set peAutoCreate to acAutoCreate
        End_Procedure
    End_Class
    
    
    Class cStoreLabel is a cIniFile
        
        Function LabelTemplate Returns String
            String sProgPath
            String sDymoPartsLabel
            Get psProgramPath of (phoWorkspace(ghoApplication)) to sProgPath
            Set psFileName to (sProgPath + '\Settings.ini')
            Get ReadString 'DYMO' 'PartsLabel' '' to sDymoPartsLabel
            Function_Return sDymoPartsLabel
        End_Function
    
    
        Function ComposeBinCS Integer iCol Integer iShelf Returns String
            String sCS
            Move '' to sCS
            If (iCol > 0 or iShelf > 0) Begin
                Move (SFormat("%1 - %2", iCol, iShelf)) to sCS
            End
            Function_Return sCS
        End_Function
    
    
        Procedure Construct_Object
            Forward Send Construct_Object
            Object oDymoPrinter is a cDymoAddIn
            End_Object
            Object oDymoLabel is a cDymoLabels
            End_Object
        End_Procedure
    
    
        Function PrintLabel tStoreLabel theLabel Returns Boolean
            String sLabel
            Boolean bOk
            String sBinCS
    
    
            If (not(IsComObjectCreated(oDymoPrinter))) Begin
                Send CreateComObject of oDymoPrinter
            End
            If (not(IsComObjectCreated(oDymoLabel))) Begin
                Send CreateComObject of oDymoLabel
            End
    
    
            Get LabelTemplate to sLabel
            Get ComOpen of oDymoPrinter sLabel to bOk
            If (bOk) Begin
                Get ComSetField of oDymoLabel 'Barcode' (Trim(theLabel.Barcode)) to bOk
                Get ComSetField of oDymoLabel 'PartNo' (Trim(theLabel.PartNo)) to bOk
                Get ComSetField of oDymoLabel 'Group' (Trim(theLabel.Group)) to bOk
                Get ComSetField of oDymoLabel 'Bin' (Trim(theLabel.Bin)) to bOk
                Get ComSetField of oDymoLabel 'BinCS' (ComposeBinCS(Self, theLabel.BinCol, theLabel.BinShelf)) to bOk
                Get ComSetField of oDymoLabel 'Description' (Trim(theLabel.Desc)) to bOk
                Get ComPrint of oDymoPrinter 1 True to bOk
            End
            Else Begin
                Error 300 (SFormat("Unable to open Parts Label file '%1'",sLabel))
            End
            Function_Return bOk
        End_Function
        
    End_Class
    - Add at each required event the object and the call like

    Code:
    Use cStoreLabel.pkg
    ...
        Object oStoreLabel is a cStoreLabel
        End_Object
        ...
                Procedure OnClick
                    tStoreLabel theLabel
                    Boolean bOk
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.NO)) to theLabel.PartNo
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.BARCODE_ID)) to theLabel.Barcode
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.BIN)) to theLabel.Bin
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.BIN_COL)) to theLabel.BinCol
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.BIN_SHELF)) to theLabel.BinShelf
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.DESC)) to theLabel.Desc
                    Get Field_Current_Value of (Main_DD(Self)) (RefTable(PART.GROUP)) to theLabel.Group
                    If (theLabel.PartNo > '') Begin
                        Get PrintLabel of oStoreLabel theLabel to bOk
                        If (not(bOk)) Begin
                            Send UserError "Label could not be printed"
                        End
                    End
                End_Procedure
    And off you go...

    Hope this is useful for others. The dymo printers are getting so cheap now, so lots of usages I'd say...

    Merry Xmas!
    Marco - 28 IT Pty Ltd - Adelaide - South Australia
    Marco Kuipers
    DataFlex Consultant
    28 IT Pty Ltd - DataFlex Specialist Consultancy
    DataFlex Channel Partner for Australia and Pacific region
    Adelaide, South Australia
    www.28it.com.au

  2. #2
    Join Date
    Feb 2009
    Posts
    2,026

    Default Re: Dymo Barcode label printing from WebApp (Intranet) howto...

    Thanks for sharing Marco.

  3. #3
    Join Date
    Feb 2009
    Location
    Goteborg, Sweden
    Posts
    3,189

    Default Re: Dymo Barcode label printing from WebApp (Intranet) howto...

    Great tip, thanks Marco.
    Nils Svedmyr
    RDC Tools International
    www.rdctools.com

    "The problem with internet quotes is that you don't know if they are true."
    Abraham Lincoln

  4. #4
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Re: Dymo Barcode label printing from WebApp (Intranet) howto...

    Thanks Marco! That's really cool and useful.

    MM
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  5. #5
    Join Date
    Feb 2009
    Location
    West Yorkshire - UK
    Posts
    928

    Default Re: Dymo Barcode label printing from WebApp (Intranet) howto...

    Also - FYI, Dymo has a localhost web interface and a javascript library, so getting the webpage to print dymo labels on the local printer should be a case of writing some javascript.
    http://developers.dymo.com/tag/javascript/
    Sean Bamforth. - D̤͍͍̭̱̄ͦ̆̏̇ͯ͑̄å̩̻͈͒͌t͇̻͙̞̤̱̏̎̐a͈͎͈ͬ̓̽ͮ̓̔̎ͅf̙͓̃̆̈́̔ ̳̣̝͔̲ḷ̩̺̗͎ͤ͂̇̚e̻̙̼̞̥͖̬̹ͮ͌ͫ̆ͬͅx͉̖̣̩̮̖̎͌ ͍̃̃̉̆̋̋ͥP̠̝̱̿͛ͬͩ̍̅̔ͣr̻̪̤͚̘̰̤͑̿̈̄̍ͯo̫͈̪̭̥͙͛̃̔̀g̔͗ͦ̅ ̝̯̘̣̘͗͆̄̋r̲͓̭͓̪̋ͩͤ͛̑́̎͋a͇̰̼͚̜̅́͌͗̆̅̏ͪͦm̯̤̱̥͇͋͒̈̅̓ͮ ̱̣̞m̖̼̰̟̗̮̬͓͗͋̏̓ͫ̑ͪͅḙ̄ͯͧ̋̋̑̊͗ͅr͕͇ͪ͒̆͗͆̓̀

  6. #6
    Join Date
    Feb 2009
    Location
    Cayman Islands
    Posts
    3,969

    Default Re: Dymo Barcode label printing from WebApp (Intranet) howto...

    Very cool Marco. Thanks
    I should be on a beach ...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •