The EA_GetMenuItems event enables the Add-In to provide the Enterprise Architect user interface with additional Add-In menu options in various context and main menus. When a user selects an Add-In menu option, an event is raised and passed back to the Add-In that originally defined that menu option.

This event is raised just before Enterprise Architect has to show particular menu options to the user, and its use is described in the Define Menu Items topic.


Function EA_GetMenuItems (Repository As EA.Repository, MenuLocation As String, MenuName As String) As Variant

The EA_GetMenuItems function syntax has these parameters.



See also



Direction: IN

Description: A string representing the part of the user interface that brought up the menu. This can be TreeView, MainMenu or Diagram.



Direction: IN

Description: The name of the parent menu for which sub-items are to be defined. In the case of the top-level menu this is an empty string.



Direction: IN

Description: An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

Repository Class

Return Value

One of these types:

  • A string indicating the label for a single menu option
  • An array of strings indicating a multiple menu options
  • Empty (Visual Basic/VB.NET) or null (C#) to indicate that no menu should be displayed

In the case of the top-level menu it should be a single string or an array containing only one item, or empty/null.

Learn more