EA_GetMenuState

Topics

Topic

Detail

See also

Details

The EA_GetMenuState event 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.

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

 

Define Menu Items

EA_GetMenuItems

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 the following elements:

Parameter

Type

Direction

Description

IsChecked

Boolean

OUT

Set to True to check this particular menu option.

 

IsEnabled

Boolean

OUT

Set to False to disable this particular menu option.

 

ItemName

String

IN

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

 

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 must be defined.

In the case of the top-level menu it 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:

None.