Find multiple barcodes
Visual Basic |
---|
Public Function Find( _ Optional ByVal MaxBarcodes As Long = 0 _ ) As Long |
Method puts CiBarcode objects in object.Barcodes collection.
MaxBarcodes set to 0 (zero) enables the detection of all the barcodes in the image.
See Barcode Reading code examples on Inlite's How-to Web Site
Sub ReadBarcodes1D(imageFile As String) ' Create objects and open input images Dim Ci As New CiServer: Dim Barcode As CiBarcode Dim reader As CiBarcodePro: Set reader = Ci.CreateBarcodePro reader.Image.Open imageFile ' Configure reader reader.Type = cibfCode39 + cibfCode128 ' Select barcode types to read ' reader.AutoDetect1D = ciTrue ' Enable automatic detection of barcode type (Slower processing) ' reader.Directions = cibHorz ' Limit barcode search direction (Faster processing) reader.Find 0 For Each Barcode In reader.Barcodes Debug.Print Barcode.Text & vbCrLf Next End Sub