跳到主内容

搜索

搜索

Printing The 'next' Barcode

评论

3 条评论

  • Avatar
    Ian Cummings
    版主
    At the moment, BarTender doesn't directly support a shared serial number value between multiple BarTender installations. However, you can use an event based VB script to read and write such a value to and from an external file or database record.

    Please see attached an example label format that does just this. Reading in a value on the "OnPrintStart" event, and writing back an updated value on the "OnPrintEnd" event.
    0
  • Avatar
    Legacy Poster
    Hi,

    Thanks for your reply.

    How exactly is the example working? I.e. how to I apply it to my label format?

    The label format is on the server so would be opened from he same location on each computer.
    0
  • Avatar
    Ian Cummings
    版主
    The serial number uses an event controlled VB script as its datasource. The script runs to read in the value at the start of the print job and then writes back the updated value at the end of the print job. The example given is for a text file, but it can be adapted to source from a database instead.

    If you need help adapting this to your needs I suggest you send an email to your local Seagull technical support location (Europe in your case) giving specifics of what you need together with your label format and the data file that will contain the serial number value if possible.

    Contact details can be found at the below web page:

    http://www.seagullscientific.com/aspx/contact_us.aspx

    Below I include the VB script of the serial number text object for your convenience.

    'OnPrintStart

    On error resume next
    Dim fs, file, fso, makedatafile, f

    If IsNumeric(Value) = False Then
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.FileExists("c:\testfile.txt")
    if f = False then
    Set makedatafile = fs.CreateTextFile("c:\testfile.txt", False)
    Set file = fs.OpenTextFile("c:\testfile.txt")
    makedatafile.writeline "1"
    Else
    Set file = fs.OpenTextFile("c:\testfile.txt")
    Value = file.ReadLine
    End If
    Value = file.ReadLine
    End if
    Value = Value

    'OnPrintEnd

    If Value <> "" then
    Dim fs, a
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\testfile.txt", True)
    a.WriteLine(Value)
    a.Close

    End if
    0

请先登录再写评论。