|
Help -> Methods -> SaveResults The Softek Barcode Reader SDK extracts barcode information from images and bitmaps. SaveResults
Overview
SaveResults(outputFile)
SaveResults saves the current set of results to an XML or CSV file.
The outputFile format is determined by the file extension (csv or xml).
The CSV fields are as follows:
Folder - location of image file
File Name
Count - number of barcodes found in image
Index - Index for this bar code (1,2,3 etc or -1 is no barcode found).
Error - Error number
ID - as specified in an xml input file for image or folder (see
ProcessXML )
Value - value of barcode
Type - type of barcode
Hits - hit count for this barcode
Page - page number in image
Direction - ScanDirection mask value for this barcode
TopLeftX - x position for top left
TopLeftY - y position for top left
BottomRightX - x position for bottom right
BottomRightY - y position for bottom right
The XML output format contains the same information as the CSV format, but
arranged in the following way:
<xml version='1.0' encoding='iso-8859-1'>
<SoftekBarcode>
<Result>
<Folder>location of
image file</Folder>
<FileName>name of file</FileName>
<Count>number of
barcodes</Count>
<Error>error number</Error>
<ID>id as specified in
an xml input file for image or folder (see ProcessXML)</ID>
Repeated for each barcode
found in image
<Barcode>
<Value>value
of barcode</Value>
<Type>type
of barcode</Type>
<Hits>hit
count</Hits>
<Page>page
number</Page>
<Direction>ScanDirection mask value for this barcode</Direction>
<TopLeftX>x position for top left</TopLeftX>
<TopLeftY>y position for top left</TopLeftY>
<BottomRightX>x position for bottom right</BottomRightX>
<BottomRightY>y position for bottom right</BottomRightY>
</Barcode>
</Result>
</SoftekBarcode>
</xml>
Return Value
1 on success and 0 on failure.
Visual Basic using the OCX
retval = [form.]SoftekBarcode.SaveResults(outputFile)
Visual Basic using the DLL
Private Declare Function stSaveResults Lib "SoftekBarcode" (ByVal strOutputFile
As String) As Integer
retval = stSaveResults(file)
Visual Basic using COM
oBar = CreateObject("SoftekATL.Barcode")
.........
oBar.SaveResults(outputFile)
retval = oBar.XMLRetval ;
VB.Net using the DLL
Private Declare Function stSaveResults Lib "SoftekBarcode" (ByVal strOutputFile
As String) As Short
retval = stSaveResults(outputFile)
VB.Net using the SoftekBarcode Wrapper Class
Dim barcode As SoftekBarcode
..........
retval = barcode.SaveResults(outputFile)
VB.Net using the SoftekBarcodeLib Managed Component
Dim barcode As SoftekBarcodeLib.BarcodeReader
..........
barcode = New SoftekBarcodeLib.BarcodeReader()
..........
retval = barcode.SaveResults(outputFile)
Visual C++ Using the OCX
short SaveResults(outputFile) ;
Visual C++ Using the DLL
short __stdcall stSaveResults(LPTSTR outputFile);
|