ClearImage COM API
FirstBarcode Method
CiDataMatrix Object : FirstBarcode Method
Description
Find the first barcode
Syntax
Visual Basic
Public Function FirstBarcode() As CiBarcode
Remarks

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

Example
Sub ReadBarcodes2DFirstNext(imageFile As String)
   ' Create objects and open input images
  Dim Ci As New CiServer
  Dim Barcode As CiBarcode, reader
  Set reader = Ci.CreatePdf417      ' To read PDF416 barcodes
  ' Set reader = Ci.CreateDataMatrix  ' To read DataMatrix barcodes
  ' Set reader = Ci.CreateQR          ' To read QR barcodes
  reader.Image.Open imageFile
    ' Configure reader
  '  reader.Directions = cibHorz   ' Limit barcode search direction (Faster processing)
  Set Barcode = reader.FirstBarcode
  Do While Not Barcode Is Nothing
     Debug.Print Barcode.Text & vbCrLf
     ' If (barcodeFound) Then Exit For '  End processing after the first barcode matching specific requirements is found
     Set Barcode = reader.NextBarcode
  Loop
End Sub
See Also

CiDataMatrix Object  | CiDataMatrix Members