Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

EA_GetMenuState

Add-Ins can use the EA_GetMenuState event 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.

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

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 has these parameters.

Parameter

Type

See also

IsChecked

Boolean

Direction: OUT

Description: Set to True to check this particular menu option.

IsEnabled

Boolean

Direction: OUT

Description: Set to False to disable this particular menu option.

ItemName

String

Direction: IN

Description: The name of the option actually clicked; for example, 'Create a New Invoice'.

MenuLocation

String

Direction: IN

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

MenuName

String

Direction: IN

Description: 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.

Repository

EA.Repository

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

None.

Learn more