ConnectCommand Method

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

Syntax

ApplicationMgr.ConnectCommand ( uiObj, cmdKind, index = 0, opts = 0)

Return Value

CommandConnection

A reference to an object that represents the new connection. Discarding the reference does not affect the connection. When the object is already connected with this type of connection, the existing connection is returned.

Purpose

Connects a control to the Application Manager control to make the connected control function as a command.

Remarks

You can connect TestStand User Interface buttons and checkboxes using this method.

To disconnect an existing connection, you must first obtain the ApplicationMgrConnections object from the ApplicationMgr.Connections property. Then, access the ApplicationMgrConnections.Command property to obtain the CommandConnections collection.

Parameters

uiObj As Object

[In] Specifies the button or checkbox control to which the command connects.

cmdKind As CommandKinds

[In] Specifies the type of command to connect.

Note  Not all commands found in the CommandKinds enumeration work with the Application Manager control. Refer to the CommandKinds enumeration for a list of compatible commands.

index As Long

[In] Specifies an index into command sets. For example, when you connect to CommandKind_EntryPointSet, this parameter specifies the index of the entry point to use.

This parameter has a default value of 0.

opts As Long

[In] Specifies a bitwise-OR combination of the CommandConnectionOptions constants.

This parameter has a default value of 0.


See Also

ApplicationMgr.Connections

ApplicationMgr.GetCommand

ApplicationMgrConnections

ApplicationMgrConnections.Command

Button

CommandConnection

CommandConnections

CommandConnectionOptions

CommandKinds

ExecutionViewMgr.ConnectCommand

SequenceFileViewMgr.ConnectCommand

WAS THIS ARTICLE HELPFUL?

Not Helpful