NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

C# error , The name 'CommandKinds' does not exist in the current context

Hi I'm trying to develop C# GUI and I want to use debug menu of TestStand using the code below I get this error.

The name 'CommandKinds' does not exist in the current context

 

ArrayList debugMenuCommands = new ArrayList( );
debugMenuCommands.Add(CommandKinds.CommandKInd_DefaultDebugMenu_Set);

Menus.InsertCommandsInMenu (debugMenuCommands,this.debugToolStrioMenuItem, null , viewMgr ,true);

This code is from user interface full featured examples 

0 Kudos
Message 1 of 2
(2,393 Views)

I noticed a typo with the capital I in your second line of code: CommandKinds.CommandKInd_DefaultDebugMenu_Set should be CommandKinds.CommandKind_DefaultDebugMenu_Set. Does that change anything?

 

If you still see the error, it may be because the namespace that defines that class is missing. Are you including all of the default namespaces?

 

For reference, you can find information on the CommandKinds Enumeration here:

http://zone.ni.com/reference/en-XX/help/370052W-01/tsuiref/reftopics/commandkinds/

 

Francine P.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,368 Views)