SetupViewerForRotatedRectSelection Method

NI Vision for Visual Basic

SetupViewerForRotatedRectSelection Method

Syntax

CWMachineVision.SetupViewerForRotatedRectSelection Viewer

Return Type

Long

On success, this method returns 0. On failure, this function returns a negative number.

Purpose

Hides menu items in the popup menu of the given viewer so it only displays tools needed to select a rotated rectangle.

Remarks

Use this method as an alternative to selecting the appropriate tools in the CWIMAQViewer property page.

Parameters

Viewer As CWIMAQViewer

The viewer that contains the popup menu to modify.

Example

Private Sub Run_Click()
    'After clicking on the Run button, the rectangle and rotated rectangle 
    'is the only shape types available, and the rotated rectangle tool
    'is selected.
    CWMachineVision1.SetupViewerForRotatedRectSelection CWIMAQViewer1
End Sub

See Also

GetSelectedRotatedRectFromViewer

CWIMAQViewer.MenuItems

CWIMAQViewer.Tool