EA_GetMenuItems

Topics

Topic

Detail

See also

Details

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.

 

Define Menu Items

EA_MenuClick

EA_GetMenuState

Syntax:

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

The EA_GetMenuItems function syntax has the following elements:

Parameter

Type

Direction

Description

MenuLocation

String

IN

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

 

MenuName

String

IN

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.

 

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.

 

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.