Command

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

Use Command objects in applications to implement a user interface element that performs a standard action, such as opening a sequence file or executing a set of selected steps in a sequence. A Command object determines the dimming, visibility, shortcut key, and caption for the menu item, button, or checkbox that invokes the command. The Command object also provides the implementation of the action, which it performs when you call the Command.Execute method.

In many cases you can use a TestStand Utility Library function, such as InsertCommandsInMenu, instead of Command objects to create menu items that invoke the commands you specify. You can also call the ConnectCommand method on a TestStand manager control to connect a command to a TestStand button or checkbox control.

To create Command objects, call the ApplicationMgr.NewCommands method to create a Commands collection. You specify the commands to create with the CommandKinds enumeration constants. When you call the Commands.InsertKind method, you can also specify a TestStand manager control. A command you create uses the specified manager control to determine the currently selected sequence file, execution, sequence, or steps. According to the selection and the type of command, the command determines the state of its properties, such as enabled and visible, and determines which items the command operates on when it executes. Some commands do not require a manager control, while others require a specific manager control. Refer to the CommandKinds enumeration for more information about which manager controls work with specific commands.

You can also create commands using the following methods:

Properties

Enabled
EntryPoint (Read Only)
EntryPointIndex (Read Only)
ExecutionViewMgr
IconName
IsSeparator
IsToggle
Kind (Read Only)
LVShortcutKey
LVShortcutModifier
SequenceFileViewMgr
ShortcutKey
ShortcutModifier
SubsidiaryCommands
ToggleState
UserData
UserObject
Visible

Methods

Execute
GetDisplayName
SetDisplayName

See Also

ApplicationMgr.ConnectCommand

ApplicationMgr.GetCommand

ApplicationMgr.NewCommands

CommandKinds

Commands

Commands.InsertKind

ExecutionViewMgr.ConnectCommand

ExecutionViewMgr.GetCommand

SequenceFileViewMgr.ConnectCommand

SequenceFileViewMgr.GetCommand

WAS THIS ARTICLE HELPFUL?

Not Helpful