Amending Picture In Xml Script Follow
hi
i'm trying to use an xml script. i can amend the namedsubstrings but can't find a way to change the pictures that are displayed.
vb.net code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim btApp As New BarTender.Application
Dim btMessages As BarTender.Messages = Nothing
btApp.XMLScript("E:\BarTenderXMLScripts\Print_Dispensed_Label.xml", BarTender.BtXMLSourceType.btXMLScriptFile, btMessages)
Dim msg As BarTender.Message
For Each msg In btMessages
MessageBox.Show(msg.Message)
Next msg
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
End Sub
xml script:
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0">
<Command Name="Job1">
<Print>
<Format>C:\Documents and Settings\johnl\My Documents\BarTender\Labels\Label7.btw</Format>
<NamedSubString Name="OrderCode">
<Value>12341234</Value>
</NamedSubString>
<NamedSubString Name="MaterialCode">
<Value>M123123</Value>
</NamedSubString>
<!-- etc., etc., need to set picture path/file here -->
</Print>
</Command>
</XMLScript>
is this supported?
johnl
3 comments

Ian Cummings
ModeratorThen in your XML use the <NamedSubString> tag to set the name of the sub-sting to the name of the picture file you want the object to be. Example: Picture1.png
http://www.motobit.com/util/base64-decoder-encoder.asp
used your first suggestion
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0">
<Command Name="Job1">
<Print>
<Format>C:\Documents and Settings\johnl\My Documents\BarTender\Labels\Label7.btw</Format>
<NamedSubString Name="OrderCode">
<Value>12341234</Value>
</NamedSubString>
<NamedSubString Name="MaterialCode">
<Value>M123123</Value>
</NamedSubString>
<NamedSubString Name="HS1">
<Value>Cosh1.jpg</Value>
</NamedSubString>
<NamedSubString Name="HS2">
<Value>Cosh2.jpg</Value>
</NamedSubString>
<NamedSubString Name="HS3">
<Value>Cosh3.jpg</Value>
</NamedSubString>
</Print>
</Command>
works a treat thank you
johnl
Please sign in to leave a comment.