NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I catch some specific UIMessage in Operator Interface ?

Hello All,
 
i am editting the TestStand 4.0 Custom Operator Interface with C#, and i'd like to catch the Message (but I don't know which message it is), when the User clicks the menu item "New Sequence File" or uses a shortcutkey combination "Ctrl+N". I have tried the axApplicationMgr_UIMessageEvent, but it doesn't seem to work.
 
Can somebody give me an idea please?
 
Thanks very much!
Regards
MY
0 Kudos
Message 1 of 5
(3,437 Views)
Hi,

there's no UIMessageEvent for the Menu items as far I can see. There ia a tag read from every menu item in case of a hit and then a method of the TesStand API will be executed: Object Class "Engine" => Call Method "GetRunTimeToolMenuItems".

To start the specific function the following Method will be executed: TestStand UI Controls => Object Class "Command" => Call Method "Execute".

So the handling of all menu entries comes from the source code of the operator interface itself. To debug that, in any case one needs a custom sequence editor license activated...

regards,

Nikolai
Message 2 of 5
(3,398 Views)

Thanks NikolaiSmiley Happy

I am just reading the Help file, hope that NI could offer more source code, and examples!

Regards
MY
0 Kudos
Message 3 of 5
(3,380 Views)
It also seems like I can only customize the "Tools"-menu in MainMenu.
Regards
MY
0 Kudos
Message 4 of 5
(3,373 Views)

In regards to catching the new sequence file command, you can add an event handler for the ApplicationMgr.PreCommandExecute event.

The Command is a parameter to the event, so you can check whether command.Kind is equal to CommandKind_Edit_NewSequenceFile.

This works both when commands are invoked explicitily through a call to Command.Execute, and when commands are invoked implicitly such as when you connect a button with the ConnectCommand method.

Message 5 of 5
(3,360 Views)