Find the first object
Visual Basic |
---|
Public Function FirstObject() As CiObject |
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