06-18-2010 06:32 AM
I have a standard TestStand platform that I am using across multiple systems. On some systems, I have some calibration sequences and I would like to have the menu updated to have the RunSequence of these calibration sequences. I know how to manually create these menu items, but they are only valid for certain sequence files. I would like to use the SequenceFileLoad sequence to dynamically create the menu items, and the SequenceFileUnload to destroy these menu items.
I have played a bit with the API, but can't dtermine the right path to get to the create and destroy the custom menu items. Does anyone know how this can be done?
Thanks,
Matthew
Solved! Go to Solution.
06-18-2010 09:04 AM
There are two ways to create menu items (other than directly in the UI) in TestStand:
1) Process Model Entry Points - Both configuration and execution entry point sequences in the process model have special sequence settings in their sequence properties dialog box for specifying where, when and how they show up in the menus.
2) Tool Menu items - Choose the customize option to add menu items. Tool menu items can have expressions which determine when to show and dim them. They can run sequences or launch .exe files.
Hope this helps,
-Doug
06-18-2010 09:17 AM
Doug,
I essentially want to do option #2, but don't want the menu items visible all the time, nor have to update each station each time a new menu item is needed when a new sequence file is developed which has a new tool menu item.
Is there a way thorugh the ActiveX API to create and destroy these tool menu items?
Thanks,
Matthew
06-18-2010 09:46 AM - edited 06-18-2010 09:46 AM
Yes, see the online help for the following API members:
Engine.GetEditTimeToolMenuItems
EditTimeMenuItems
EditTimeMenuItem
Basically you get a collection of the tool menu items using Engine.GetEditTimeToolMenuItems(), then call EditTimeMenuItems.Insert() or EditTimeMenuItems.Remove(). If you insert one you get returned an EditTimeMenuItem object on which you can modify the settings.
Also, since there is an expression to hide the tool menu items, you don't necessarily need to destroy them, you can hide them instead.
Hope this helps,
-Doug
07-07-2010 05:14 PM
Thanks for the help. I finally got to do this and it works like a charm. I even got to use the visibility options, as my customer decided to hide certain menu items based on privileges.