Implementing a Tools Menu
- Updated2025-03-28
- 1 minute(s) read
Implementing a Tools Menu
To implement a Tools menu, you must first call the Engine.GetRunTimeToolMenuItems method, which returns a collection of RunTimeMenuItem objects. Each object in the collection represent menu items or submenus to display. The Engine.GetRunTimeToolMenuItems method takes an EditArgs object as a parameter. Pass an EditArgs object to indicate which execution, sequences, and steps are selected when the user requests to display the Tools menu.
For each menu item, the RunTimeMenuItem.Text property specifies the menu item text and the RunTimeMenuItem.ItemEnabled property specifies whether the menu item is enabled. If the RunTimeMenuItem.SubMenuItems property is not NULL, you must display the menu item as a submenu. The RunTimeMenuItem.SubMenuItems property returns a collection of its submenu items.
Use RunTimeMenuItem.InvokeItem to execute a menu item, which launches an executable or runs a sequence in a new execution. Pass the same EditArgs object as the parameter you used when calling the Engine.GetRunTimeToolMenuItems method.
In addition to displaying the Tools menu items in an application, you can also add a Customize menu item to allow the user to configure the Tools menu. To do so, add a menu item to the Tools menu that calls the Engine.DisplayToolMenuDialog method. To customize the Tools menu programmatically, operate on the collection the Engine.GetEditTimeToolMenuItems method returns.