EA_GetMenuState

Return to Introduction  Previous page  Next page

The EA_GetMenuState enables the Add-In to set a particular menu option to either enabled or disabled. This is useful when dealing with locked packages and other situations where it is convenient to show a menu option, but not enable it for use.

Syntax

Sub  EA_GetMenuState(Repository as EA.Repository, MenuLocation As String, MenuName as String, ItemName as String, IsEnabled as Boolean, IsChecked as Boolean)

The EA_GetMenuState 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 must be defined. In the case of the top-level menu it is an empty string.

ItemName

String

 

The name of the option actually clicked, eg. "Create a New Invoice".

IsEnabled

Boolean

 

Boolean. Set to False to disable this particular menu option.

IsChecked

Boolean

 

Boolean. Set to True to check this particular menu option.

Return Value

None.

Details

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

See Also