Passing Data Into A Labelformatdocument Object Via The Substrings Array S’abonner

0
Avatar
Legacy Poster

using bartender 9.4
- via Visual Studio 2010
- prepared the btw file using the "Bartender Enterprise Automation - Trial"
* managed to create "Named Sub-Strings" for the text objects on the label
- includeing a QRCode object, that is trying to assemble contents from 2 of the text items
- the application is able to create teh engine, and the LabelFormatDocument object
- There is an implication that just setting the the substrings in the format will print that data on the label
Dim btFormat As LabelFormatDocument = btEngine.BtEngine.Documents.Open(ssoSysSettings.BartenderFinishedGoodsLabelFormatFile)
btFormat.SubStrings("LotNumber").Value = Me.LotNumber
btFormat.SubStrings("ItemShortName").Value = Me.ManufacturedItem.ITMSHNAM
btFormat.SubStrings("ItemNumber").Value = Me.ManufacturedItem.ITEMNMBR
btFormat.SubStrings("ProductDescription").Value = Me.ManufacturedItem.ITEMDESC
* The above does not update the btFormat object and the resulting label only prints the graphic and an empty QRCode

How is a label supposed to be formatted to allow an application to load data into it for printing?
- Please provide a tutorial to accomplish this.

4 commentaires

0
Avatar
Susan Chen
Modérateur
Actions pour les commentaires Permalien

Hi, Bob:


You can find the VB.net program sample in Bartender Help->Automating Bartender-> Automation with Bartender .NET SDKs-> Get Started-> How To: Change Text and Barcode Data on LabelFormat


In VB sample: Modifying Named Substrings

Dim btEngine As New Engine()

Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("c:\MyLabel.btw")

btFormat.SubStrings("Address").Value = "1313 Mockingbird Lane, Anywhere, USA"

btFormat.SubStrings("Name").Value = "John Doe"

btFormat.SubStrings("Quantity").Value = "10"


Have you assigned the value for example ME.LotNumber? You mention about QRcode is from2 text items. If you still encounter problems, you can send your label format to asiatech@seagullscientific.com, we will work with you more.


Thanks!
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I have a related issue, but for Bartender 10.

Is there a path forward on template design for Bartender 10? I have developed an application like the above in 9.4 that worked just fine, but I have a new client coming up and we'll be purchasing version 10. However, when I loaded up the trial for testing, I found that the old code no longer works, because the Named SubStrings no longer exist in ver 10 templates. The documentation still contains the .SubStrings("[substringname]").Value = whatever syntax. I couldn't find guidance in the documentation on creating a template that will work with outside scripting. Thanks!
0
Avatar
Gene Henson
Actions pour les commentaires Permalien

Hi Sean,

What we used to refer to as "Sub-Strings" still exist with the version 10 documents, and you will not need to change your code at all. We've gotten rid of the word substring and we now refer to them simply as data-sources. Each data-source can be given a name, which replaces the old named sub-strings.

This image shows where to set the data source name in version 10:
[attachment=130:Data Source Name.PNG]
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

3127 Unable to print. The PrintToFileLicense property must be set to a valid license prior to printing. Help me

Vous devez vous connecter pour laisser un commentaire.