05-08-2013 05:29 AM
Hi,
Can you please suggest me, how to execute a file menu item entry point pragmatically in a VC++ code.
My process model seq inserts an item called "Select Model" into TS file menu.
i have to programmatically execute this entrypoint from an Operator interface developed in VC++.
Request your suggestion in this concern.
05-08-2013 08:11 AM
Couln't you just use the PerformClick Method? So basically you'll have a reference to your menu somewhere in the code. Get the node of the item you want and then use the PerformClick method.
From MSDN: http://msdn.microsoft.com/en-us/library/system.windows.forms.menuitem.performclick%28v=vs.71%29.aspx
I recommend that vs going through the TestStand API. It will be a lot cleaner.
05-08-2013 10:05 AM - edited 05-08-2013 10:06 AM
Is "Select Model" a configuration entry point? If so, maybe the following would work:
Command command = seqFileViewMgr.GetCommand(CommandKind_ConfigurationEntryPoints_Set, 0);
command.Execute(parameter depends on how you want to handle errors);
Hope this helps,
-Doug