Saltar al contenido principal

Búsqueda

Búsqueda

Specifying Printer, Label Template, Serialization, And Data From Trigger File

Comentarios

7 comentarios

  • Avatar
    Domingo Rodriguez
    Moderador

    Can the Linux application produce a "DATAxxxx.txt" trigger file with either a Commander Script header or by using BTXML-Script?

     

    With Commander Script you can indeed include more than print job to be printed (different BT documents per print job), but each print job / document needs to share the same set of variable data. You can workaround this limitation by e.g. performing a database query prompt, but BTXML-Script (only in Enterprise Automation Edition) is better at performing multiple print jobs than what you could achieve with Commander Script. An example of sending multiple print jobs using BTXML-Script is:

     

    <?xml version="1.0" encoding="utf-8"?>

    <XMLScript Version="2.0">

    <Command Name="Job1">

    <Print>

    <Format CloseAtEndOfJob="true">Document1.btw</Format>

    <PrintSetup>

    <IdenticalCopiesOfLabel>5</IdenticalCopiesOfLabel>

    </PrintSetup>

    </Print>

    </Command>

    <Command Name="Job2">

    <Print>

    <Format CloseAtEndOfJob="true">Document2.btw</Format>

    <PrintSetup>

    <IdenticalCopiesOfLabel>5</IdenticalCopiesOfLabel>

    </PrintSetup>

    </Print>

    </Command>

    <Command Name="Job3">

    <Print>

    <Format CloseAtEndOfJob="true">Document3.btw</Format>

    <PrintSetup>

    <IdenticalCopiesOfLabel>5</IdenticalCopiesOfLabel>

    </PrintSetup>

    </Print>

    </Command>

    </XMLScript>

     

     

    For setting the variable data for a print job, you would use:

     

    <?xml version="1.0" encoding="utf-8"?>

    <XMLScript Version="2.0">

    <Command Name="Job1">

    <Print>

    <Format>c:\BarTender\Document1.btw</Format>

    <RecordSet Name="Text File 1" Type="btTextFile">

    <Delimitation>btDelimQuoteAndComma</Delimitation>

    <UseFieldNamesFromFirstRecord>true</UseFieldNamesFromFirstRecord>

    <TextData>

    <![CDATA[

    "FirstName","LastName","City","Zip Code"

    "Adam","Jones","Bellevue","98008",

    "John","Smith","Kirkland","98293"

    ]]>

    </TextData>

    </RecordSet>

    </Print>

    </Command>

    </XMLScript>

     

    Commander, in newer versions (this includes v10.0) supports document caching by default, so the BT documents you open in the first print job will remain cached until you use them again. You can take a look at these advanced features by accessing the "Detection > BarTender Command Handler" Setup dialog in Commander.

    0
  • Avatar
    Legacy Poster

    Thank you Domingo for the detailed reply.

    My Linux application can produce a BTXML file for each job.

    When using the BTXML script, my problem is the repetitive content.

    That is why I created the DATAxxxx.TXT and LABELDEFS.TXT hoping I could read and evaluate data from them.

    So, in the BTXML file for a job, can I out code to,

     

    <Format> Read the btw format from the current record in DATAxxxx.TXT </Format>

    ...

    <Printer> Read the printer name from the record in DATAxxxx.TXT </Printer>

    ...

    <TextData> Read the "FiledNames" for the btw format from LABELDEFS.TXT, and read the "LabelData" from the current record in DATAxxxX.TXT </TextData>

     

    This way, I can use the same generic BTXML and loop it until the whole DATAxxxx.TXT has been read.

     

    Maybe a long shot, but I'd appreciate your feedback.

     

    0
  • Avatar
    Domingo Rodriguez
    Moderador

    As far as I know, such references to data from other files are not directly possible.

     

    There is a "Transform" command type in Commander that will allow you to make use of "Search & Replace" actions on the original trigger file (even using regular expressions), but it won't let you replace existing data with data from an external source.

     

    There is another command called "Operating System" will allow you to execute any command you can run via "Start > Run" in BarTender, and this includes e.g. a VB program which would reformat the original trigger file. However, writing this VB program to transform the original trigger files would end up being more complex than making repetitive data entry.

    0
  • Avatar
    Legacy Poster

    Ok, that makes sense.

    I will build the BTXML file from the Linux application with the proper variable values.

    I appreciate the help you've extended.

    0
  • Avatar
    Legacy Poster

    I have a similar question/challenge.  I have a comma delimited file that I don't have the ability to change.  I have a customer field in the file that I would like to use to decide what label template to choose.  Is this possible?

    0
  • Avatar
    Legacy Poster

    Disregard my previous post.  I found reference to this functionality on a separate topic thread.

    0
  • Avatar
    Legacy Poster

    Disregard my previous post.  I found reference to this functionality on a separate topic thread.

    Could you please share how or what you found out about the 'template choosing' dilemma?

    0

Iniciar sesión para dejar un comentario.