CurrentResult Property
Example
The following SPEL+ language example runs a vision sequence called "mtest" which contains a Blob object
called "Blob01". "Blob01" has been defined to find multiple blobs (3) from within a single Search Window.
(i.e. mtest.Blob01.NumberToFind = 3)
The following program will run the sequence and make sure that the proper number of features (3) was
found for "Blob01" and then print the Area for each result.
Function main
#define NUM_TO_FIND 3
Integer foundCount, area
VRun mtest
VGet mtest.Blob01.NumberFound, foundCount
If foundCount = NUM_TO_FIND Then
Print "The correct number of blobs were found"
Else
Print "Only (", found, ") blobs were found"
EndIf
VSet mtest.Blob01.CurrentResult, 1
VGet mtest.BLOB01.Area, area
Print "1st blob area =", area, "pixels"
VSet mtest.Blob01.CurrentResult, 2
VGet mtest.Blob01.Area, area
Print "2nd blob area =", area, "pixels"
VSet mtest.Blob01.CurrentResult, 3
VGet mtest.Blob01.Area, area
Print "3rd blob area =", area, "pixels"
Fend
42 Vision Guide 5.0 Reference (Ver.5.3) Rev.1