ClearImage COM API
FirstObject Method
CiTools Object : FirstObject Method
Description
Find the first object
Syntax
Visual Basic
Public Function FirstObject() As CiObject
Return Type
Nothing or null when no more objects are available.
Remarks
Method requires bi-tonal image (object.Image.BitsPerPixel = 1).
Example
Sub ListObjects(imageFile As String)
      ' Open image file
  Dim ci As New CiServer
  Dim Tools As CiTools: Set Tools = ci.CreateTools
  Tools.Image.Open imageFile
      ' Do processing
  Dim Obj As CiObject
  Set Obj = Tools.FirstObject
  Do While Not Obj Is Nothing
    '  Do something with Obj using Object properties
    Debug.Print "  Rect=" & "(" & Obj.Rect.Left & "," & Obj.Rect.Top & " - " & Obj.Rect.Right & "," & Obj.Rect.bottom & ")"
    Debug.Print "   Pixels=" & Obj.Pixels & "   Intervals=" & Obj.Intervals & vbCrLf
    Set Obj = Tools.NextObject
  Loop
End Sub
See Also

CiTools Object  | CiTools Members  | NextObject  | ExtractObject  | FirstObject  | CiObject