Change Fields(Text) From A Template Label Follow

Legacy Poster

I'm trying to develop a test software using C# to print label for the product tested.
Using the Active X or SDK, for the bartender application, I just give the path and print the template of the label.
What I want to do is to be able to change some fields from a certain label and not have the information in the label as a constant.
is there a way to do this?



Fernando Ramos Miracle
Comment actions Permalink

Hello Luis,


Indeed this can be done.


The easiest way of doing so is through the "SubString.Value" property. Below you'll find a sample of how this is done:



Engine btEngine = new Engine();
LabelFormatDocument btFormat = 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"; 





Please note that in BarTender's Help documentation you'll find explanation on all our classes and properties with examples, apart of samples such as the one displayed above.


You can find our documentation through BarTender's "Help>BarTender's Help" option.

Please sign in to leave a comment.