EA_GetMenuItems

Return to Introduction  Previous page  Next page

The EA_GetMenuItems 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.

Syntax

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

The EA_GetMenuItems function syntax contains the following elements

Parameter

Type

Direction

Description

Repository

EA.Repository

IN

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

MenuLocation

String

 

String representing the part of the user interface that brought up the menu. Can be TreeView, MainMenu or Diagram.

MenuName

String

 

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

Return Value

One of the following 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.

Details

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

See Also