NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify the C operator interface provided with TestStand 3.0

I'm trying to take the C++ full-featured Operator Interface and modify it just a little. I want to change some button names. For example, when I load a sequence file, I have a "Test UUTs" button. I want to change the name of this to "Start". I have run a search and can not find where the text is actually set on the button. I know the button is an active-x control, so is the name "Test UUTs" buried in some .dll that I don't have the source to? Try to simple modify the button resource text but this is always replaced. I'm also trying to rename some of the items in the drop-down menus (ie; help->about) without creating new ones. I'd appreciate any help. Thanks.
0 Kudos
Message 1 of 5
(3,292 Views)
When you connect a command, you get back a CommandConnection object. This object has an Options property that you can use to specify that you are going to set the caption instead of letting the command determine the caption. In the full MFC OI example change:

mSequenceFileViewMgr->ConnectCommand(mFileTab.mEntryPoint1Btn, CommandKind_ExecutionEntryPoints_Set, 0, CommandConnection_NoOptions);

to

mSequenceFileViewMgr->ConnectCommand(mFileTab.mEntryPoint1Btn, CommandKind_ExecutionEntryPoints_Set, 0, CommandConnection_NoOptions)->Options = CommandConnection_IgnoreCaption;

mFileTab.mEntryPoint1BtnCWnd.SetWindowText("Run the sequence");


For the About menu item, it is the only menu item in the example that is not connected to a command. The only reason
its text changes is because the application is localizing all of its strings by calling localizer.LocalizeWindow. If you change the ABOUT caption in the menu resource to anything else, it won't be found in the string files and thus won't be localized.
Message 2 of 5
(3,292 Views)
Thank you, that was VERY helpful. Just one more question, suppose you are trying to set the text to a button that can have two different names, for example, the Terminate/Restart button.

mExecutionViewMgr->ConnectCommand(mExecutionTab.mTerminateRestartBtn, CommandKind_TerminateRestart, 0, CommandConnection_NoOptions);

Can you do something similar for this; instead of "Terminate Execution"/"Restart", have it set to "Stop"/"Restart" ?

John
0 Kudos
Message 3 of 5
(3,292 Views)
To statically change TestStand default strings, you can overide the string resource files with your own string files.

For example, to overide the

DEBUG_TERM = "Terminate E&xecution"

entry in \Components\NI\Language\English\UIControlStrings.ini, make your own file such as \Components\User\Language\English\MyStrings.ini and place the following text in the file:

[TSUI_COMMANDS]
DEBUG_TERM = "Stop"

For more information, refer to TS 3.0 Reference Manual>>Chapter 8 - Customizing and Configuring TestStand>>Customizing TestStand>>Creating String Resource Files.
0 Kudos
Message 4 of 5
(3,292 Views)
Thank you very much. It all works great...and makes a lot more sense. Thanks again.
0 Kudos
Message 5 of 5
(3,292 Views)