Sort Property
Applies To
Vision Objects: Blob, Contour, Correlation, DefectFinder, Geometric
Description
Sets or returns the sort order used for the results of an object.
Usage
VGet Sequence.Object.Sort, var
VSet Sequence.Object.Sort, value
- Sequence
- Name of a sequence or string variable containing a sequence name.
- Object
- Name of an object or string variable containing an object name. The object must exist in the specified sequence.
- var
- Integer variable that will contain the value of the property.
- value
- Integer value or expression for the new value of the property.
Values
- 0 - None
- Vision constant: VISION_SORT_NONE
- No sorting is done.
- 1 - PixelX
- Vision constant: VISION_SORT_PIXELX
- Results are ordered from left to right according to the PixelX result.
- 2 - PixelY
- Vision constant: VISION_SORT_PIXELY
- Results are ordered from top to bottom according to the PixelY result.
- 3 - PixelXY
- Vision constant: VISION_SORT_PIXELXY
- Results are ordered diagonally from upper left to lower right according to the PixelX and PixelY results.
- 4 - CameraX
- Vision constant: VISION_SORT_CAMERAX
- Results are ordered from left to right according to the CameraX result.
- 5 - CameraY
- Vision constant: VISION_SORT_CAMERAY
- Results are ordered from bottom to top according to the CameraY result.
- 6 - CameraXY
- Vision constant: VISION_SORT_CAMERAXY
- Results are ordered diagonally from lower left to upper right according to the CameraX and CameraY results.
- 7 - RobotX
- Vision constant: VISION_SORT_ROBOTX
- Results are ordered along the Robot's X axis according to the RobotX result.
- 8 - RobotY
- Vision constant: VISION_SORT_ROBOTY
- Results are ordered along the Robot's Y axis according to the RobotY result.
- 9 - RobotXY
- Vision constant: VISION_SORT_ROBOTXY
- Results are ordered diagonally according to the RobotX and RobotY results.
Default: 0 - None
Remarks
The Sort property allows you to sort the results of an object so that you can retrieve the results in the desired order.
If you want to retrieve results in descending order, then reverse the order that you retrieve them.
For example:
For i = numFound To 1 Step -1
VGet seq1.blob01.RobotXYU(i), found(i), x(i), y(i), u(i)
Next i
See Also
Blob Object, Contour Object, Correlation Object, Geometric Object