Automating Template Sequence Follow

Legacy Poster

First, I want to apologize because I've tried a couple days now reading the forums and manuals to figure out a way to do this. I'm hoping someone could help.  I have a feeling you might say upgrade to Enterprise and use XML.  Here goes.


We are using Automation 10.1 SR4.  When a user on our network needs to print labels to a specific printer, our system is dumping a TXT file to a folder that Commander is scanning.  Commander then runs the script.  Here is what it looks like:

%BTW% /AF="(location of BTW files)" /D=%Trigger File Name% /PRN="(Printer Name)" /R=3 /P /DD /C=100%END%field1~field2~field3~field4~field5~...(and so on to field20).  And yes, we've setup the DB with a custom delimiter.


When this TXT file is created, it writes what printer to use and the /C=# is defined by the number of prints the user selects. This has been working great so far.  Single and multi-template BTW files are printing correctly with the data fields being sent in.


Here's the problem:  Our users want a particular multi-template label to print as all template 1 and then all template 2, etc.  Right now, it will only print template 1, template 2, template 1, template 2, etc.  I'm sure we're all aware of that.  I've read that my next option is to use batch maker, which I know is like XML scripting.  I also know that XML scripting is supported in Enterprise Automation, which I'm one level down from.  Anyway, I'm not finding how to automate a BTBAT file.  And if I could, would it pass the custom data into each of the templates with the defined number of prints?


So, the idea is that someplace in the data fields, let's say field16, is a number that defines how many of the templates it needs to print.  I have a BTW file setup with 8 templates in the Primary Templates section.  Template 2 is setup with:  Print When: [DB 20 Fields.Field16] > "1"  and Template 3 is setup with:  Print When: [DB 20 Fields.Field16] > "2"  and so on.


As you can probably predict, when the user wants to print 100 labels, and field16 will be 4; we need it to print 100x template 1, then 100x template 2, then 100x template 3, and finally 100x template 4.  I would even accept, or prefer, it to do 25x template 1, then 25x template 2, etc.


This is where I'm stuck.  Where can I look to resolve my predicament?  Thank you so much in advance!


Ian Cummings
Comment actions Permalink

Create your Commander script with two command lines.  The first to print template/document 1 and the second to print template/document 2.  Something like the below should do it:


%BTW% /AF="(document1)" /D=%Trigger File Name% /PRN="(Printer Name)" /R=4 /P /DD /C=100

%BTW% /AF="(document2)" /D=%Trigger File Name% /PRN="(Printer Name)" /R=4 /P /DD /C=100


field1~field2~field3~field4~field5~...(and so on to field20)

Please sign in to leave a comment.