ClearImage .NET API
NextBarcode Method (CiBarcodePro)
Example 





Inlite.ClearImage Namespace > CiBarcodePro Class : NextBarcode Method
Find another barcode
Syntax
'Declaration
 
Public Function NextBarcode() As CiBarcode
'Usage
 
Dim instance As CiBarcodePro
Dim value As CiBarcode
 
value = instance.NextBarcode()
public CiBarcode NextBarcode()
public function NextBarcode(): CiBarcode; 
public function NextBarcode() : CiBarcode;
public:
CiBarcode^ NextBarcode(); 
Remarks

Use FirstBarcode/NextBarcode methods when searching for barcodes with specific requirements, e.g., prefix presence in CiBarcode.Text value

Example
void ReadBarcodes1DFirstNext(string imageFile)
{
    // Create objects and open input images
    CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
    CiBarcode Barcode;
    CiBarcodePro reader = ci.CreateBarcodePro();
    reader.Image.Open(imageFile, 1);
    // Configure reader
    reader.Type = FBarcodeType.cibfCode39 | FBarcodeType.cibfCode128;  // Select barcode types to read
    // reader.AutoDetect1D = true;  // Enable automatic detection of barcode type (Slower processing)
    // reader.Directions = FBarcodeDirections.cibHorz;   // Limit barcode search direction (Faster processing)
    Barcode = reader.FirstBarcode();
    while (Barcode != null)
    {
        Console.WriteLine(Barcode.Text);
        // If (barcodeFound) Then Exit For '  End processing after the first barcode matching specific requirements is found
        Barcode = reader.NextBarcode();
    }
}
Sub ReadBarcodes1DFirstNext(imageFile As String)
    ' Create objects and open input images
    Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
    Dim Barcode As CiBarcode
    Dim reader As CiBarcodePro = ci.CreateBarcodePro()
    reader.Image.Open(imageFile, 1)
    ' Configure reader
    reader.Type = FBarcodeType.cibfCode39 + FBarcodeType.cibfCode128  ' Select barcode types to read
    ' reader.AutoDetect1D = True  ' Enable automatic detection of barcode type (Slower processing)
    ' reader.Directions = FBarcodeDirections.cibHorz   ' Limit barcode search direction (Faster processing)
    Barcode = reader.FirstBarcode()
    Do While Not Barcode Is Nothing
        Console.WriteLine(Barcode.Text)
        ' If (barcodeFound) Then Exit For '  End processing after the first barcode matching specific requirements is found
        Barcode = reader.NextBarcode()
    Loop
End Sub
See Also

Reference

CiBarcodePro Class
CiBarcodePro Members