Setting Substrings For Printlabelformattask Using Taskmanager Follow

Legacy Poster

Hi, I'm trying to print a label which contains template fields that I need to fill in programmatically.  I am accessing the LabelFormat property of my PrintLabelFormatTask and trying to set the SubStrings.  I find that the first time I look at the LabelFormat property, the status is "Created" and the SubStrings.Count is 0.  I think that's because the label hasn't actually been loaded into BarTender yet.  But I can't figure out HOW to load the barcode into bartender.  If I were using an Engine I could just engineInstance.Open() my file, but I'm not - I'm using a TaskManager to queue printing with multiple engines.  There's a TaskManager.Engines array available, but that doesn't seem to give me access to an Open function.  How do I get my LabelFormat to load so I can set the strings properly. 

Note: If I try to print the label multiple times then the first time I print it causes the LabelFormat to load so the second time I can set the SubStrings properly...but there is surely a better way to load a LabelFormat than by printing...right?


Domingo Rodriguez
Comment actions Permalink

From BarTender's Help (press F1 key), please visit the "Automating BarTender > Automation with the BarTender .NET SDKs > BarTender .NET Print Server SDK > Getting Started > Retrieving and Setting Label Format Properties".


This should help you to move forward.

Please sign in to leave a comment.