ILabelerDriver interface : PrintAndApply method

PrintAndApply method
Description
VWorks software calls the PrintAndApply method to tell the plugin to print and apply a labware label using the data provided in the labelxml parameter.
Syntax
 
HRESULT PrintAndApply(
[in] BSTR *labelxml,
[out,retval] enum ReturnCode *retVal
);
Parameters
 
0 = The request was completed (RETURN_SUCCESS)
1 = Something was wrong with the input, so the request was not completed (RETURN_BAD_ARGS)
2 = The request was not completed (RETURN_FAIL)
PrintAndApply method input
VWorks software passes a PrinterMetaData XML block into the labelxml parameter of the PrintAndApply method.
PrinterMetaData XML block
The PrinterFormatMetaData XML block contains the PrinterMetaData element and all its children. This XML block provides the name of a label format, its associated field names, and the contents of each field, if any. The PrinterFormatMetaData XML block also specifies the side of the labware on which to apply the label.
XML format
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<PrinterMetaData>
<PrinterFormatMetaData>
<PrinterFormatMetaData>
<PrinterFieldMetaData>
<PrinterFieldMetaData />
...
</PrinterFieldMetaData>
</PrinterFormatMetaData>
</PrinterFormatMetaData>
</PrinterMetaData>
XML elements and attributes
See “PrinterMetaData XML block components” .
Example of PrintAndApply method input
The following sample code is a PrinterMetaData XML block received by the plugin from VWorks software as a string in the labelxml parameter of the Print method. VWorks software tells the plugin to print the value barcode in the field named 1 using the label format named Name. The value of the Side attribute tells the plugin to print and apply the label.
 
<PrinterMetaData >
<PrinterFormatMetaData >
<PrinterFormatMetaData Name='1' Side='South' >
<PrinterFieldMetaData >
<PrinterFieldMetaData Name='1' Value='barcode' />
<PrinterFieldMetaData Name='2' />
<PrinterFieldMetaData Name='3' />
<PrinterFieldMetaData Name='4' />
<PrinterFieldMetaData Name='5' />
<PrinterFieldMetaData Name='6' />
</PrinterFieldMetaData>
</PrinterFormatMetaData>
</PrinterFormatMetaData>
</PrinterMetaData>
Related information