ILabelerDriver interface : EnumerateFormats method

EnumerateFormats method
Description
VWorks software calls the EnumerateFormats method to tell the plugin to enumerate all available label formats.
Syntax
 
HRESULT EnumerateFormats(
[out] BSTR *formats,
[out,retval] enum ReturnCode *retVal
);
Parameters
 
[out] A PrinterMetaData XML block that contains the names of all available label formats and their associated field names.
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)
EnumerateFormats method output
The plugin returns a PrinterMetaData XML block in the formats parameter of the EnumerateFormats method.
PrinterMetaData XML block
The PrinterMetaData XML block contains the PrinterMetaData element and all its children. This XML block provides the names of all available label formats and their associated field names.
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 EnumerateFormats method output
The following sample code is a PrinterFormatMetaData XML block that is returned to VWorks software by the plugin as a string in the formats parameter of the EnumerateFormats method. The plugin returns the label format named 1 and enumerates its fields.
 
<PrinterMetaData >
<PrinterFormatMetaData >
<PrinterFormatMetaData Name='1' >
<PrinterFieldMetaData >
<PrinterFieldMetaData Name='1' />
<PrinterFieldMetaData Name='2' />
<PrinterFieldMetaData Name='3' />
<PrinterFieldMetaData Name='4' />
<PrinterFieldMetaData Name='5' />
<PrinterFieldMetaData Name='6' />
</PrinterFieldMetaData>
</PrinterFormatMetaData>
</PrinterFormatMetaData>
</PrinterMetaData>
Related information