Btxml Field Substitution Follow

0
Avatar
Legacy Poster

Hello all,

I'm new to the BarTender software, and have been engaged to build an automation solution around it.

My customer envisions using a generic lable that, via BTXML script, can be made to insert string data into text fields defined on a label, as well as passing a path to a graphic file that would then be printed on the label.

I've looked through the Automation documentation, and the insertion of string data looks possible, but I'm not sure about a dynamically inserted image.

If someone could shed some light on this, I'd appreciate it.

Regards,

CG

2 comments

0
Avatar
Legacy Poster
Comment actions Permalink

If the image you're trying to insert and print is stored in a location that can be pathed to, then it's certainly possible. See topics like this one: http://seagullscientific.invisionzone.com/index.php?/topic/217-print-or-suppress-image-conditionally-part-2/

I admit though, I don't know what BTXML is, and I'm a basic programmer at best, and I may be answering a question you're not asking.
0
Avatar
Legacy Poster
Comment actions Permalink

[quote name='nRyder' timestamp='1314995111' post='505']
If the image you're trying to insert and print is stored in a location that can be pathed to, then it's certainly possible. See topics like this one: http://seagullscientific.invisionzone.com/index.php?/topic/217-print-or-suppress-image-conditionally-part-2/

I admit though, I don't know what BTXML is, and I'm a basic programmer at best, and I may be answering a question you're not asking.
[/quote]

Thank you for your quick response, @nRyder. With the help of BT's tech support I was able to get this resolved a short while ago.

What was non-obvious to me was that in order to make this work one has to set the "Share/name" property on the advanced datasource dialog of fields that one expects to receive data from within the XML file. Those fields should not be database fields, but what BT calls "Screen data fields".

Below is the XML file I put together to set the appropriate values in my label:
[code]
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0">
<Command Name="Job1">
<Print>
<Format>D:\PrivateCommon\Documents\LabelPrinting\BarTender\Test.btw</Format>
<NamedSubString Name="Field1">
<Value>Test data value</Value>
</NamedSubString>
<NamedSubString Name="Field2">
<Value>36</Value>
</NamedSubString>
<NamedSubString Name="Field3">
<Value>C:\Users\Public\Pictures\Goofy\Train_20wreck_202_20vertical_20050215_small.jpg</Value>
</NamedSubString>
</Print>
</Command>
</XMLScript>
[/code]

Thank you for your suggestions.

Please sign in to leave a comment.