How To Handle Multiple /f Parameters In A Trigger File 关注
I have one trigger file that contains data for two bartender designs
How can I handle this in one trigger file
I tried a set-up like this , but it does not work
%BTW% /AF="C:\directory\name.btw" /PRN="M4" /R=3 /P /D="%Trigger File Name%" /C=1 /S=1 /Close /AF="C:\directory\products.btw" /PRN="M4" /R=5 /P /D="%Trigger File Name%" /C=1 /S=3 /Close
%END%
"name";"address";"city"
"aaa";"bbb";"ccc"
"name";"product";"description"
"hhh";"jjj";"kkk"
"hhh";"www";"mmm"
"hhh";"ggg";"vvv"
How to handle multiple /F or /AF parameters
Each design has its own parameters
2 评论

Shotaro Ito
As I know, Commander script cannot handle two or more %BTW% commands (which actually calls BarTender) with embedded text database, within a trigger file.
There's some workarounds:
-
a. Just create two commander script triggers.
Note that if you're running multiple command handlers(BarTender processes), the print order may not be kept.
Is that why you trying to include two btw documents in a trigger? In such case, XML script is the option - or give some break before dropping next trigger to the same printer.
-
b. Use XML Script trigger, by creating BarTender XML Script from your application.
XML Script can contain multiple document with different text database.(Enterprise Automation Edition required)
For how to write BarTender XML Script, please read BarTender's online help > Automating BarTender > Automation with BarTender XML Script.
There's some articles about XML script that might helps.
http://forums.seagullscientific.com/index.php?/topic/2630-specifying-printer-label-template-serialization-and-data-from-trigger-file/
http://forums.seagullscientific.com/index.php?/topic/1570-printing-multiple-record-in-an-xml-file-was-working-fine-with-bartender-75-csv/?p=4623 -
c. Use template selector to select template, depends on database field value.
BarTender Automation 10.0 or later introduced Template Selector to dynamically select template.
Note that you need to have a common text database for multiple templates - all templates in a btw document connects to the same text database, so the text database need to have all required fields for all templates, and a template name field.
For this feature, refer to what's new white paper of BarTender 10.0
http://www.seagullscientific.com/label-software/whitepapers/whitepaper_whatsnewinbt10.pdf
Actually, you can indeed call 2 BTW commands within the same text trigger file, but if the trigger file also contains data, then both BTW calls will share the same set of data unless you set a query prompt on the database:
As an example:
%BTW% /AF="C:\directory\name.btw" /PRN="M4" /R=3 /P /D="%Trigger File Name%" /C=1 /S=1 /Close
%BTW% /AF="C:\directory\products.btw" /PRN="M5" /R=3 /P /D="%Trigger File Name%" /C=1 /S=3 /Close
%END%
Your shared data here
Or
%BTW% /AF="C:\directory\name.btw" /PRN="M4" /R=3 /?myquery="A1" /P /D="%Trigger File Name%" /C=1 /S=1 /Close
%BTW% /AF="C:\directory\products.btw" /PRN="M5" /R=3 /?myquery="A2" /P /D="%Trigger File Name%" /C=1 /S=3 /Close
%END%
Your shared data here
请先登录再写评论。