前页 | 后页 |
EARules_AppendChildDiagrams
EARules_AppendChildDiagrams allows an Add-In registered to provide rules for a language to specify the list of items to be shown in the '[New Child Diagram' menu.
This event occurs when a context menu is shown that includes 'New Child Diagram'.
Syntax
Function EARules_AppendChildDiagrams (Repository As EA.Repository, Language As String, Parent as EA.Element, Diagram as EA.Diagram, Order as Integer) As Variant
The EARules_AppendChildDiagrams function syntax contains these parameters.
Parameter |
Description |
See also |
---|---|---|
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 |
Language |
String Direction: IN Description: Specifies the language for the rule that Enterprise Architect is requesting. This will match one of the values returned from EARules_Initialize. |
EARules_Initialize |
Parent |
EA.Element Direction: IN Description: Specifies the element showing a context menu that includes the option for new child diagrams. |
Element Class |
Diagram |
EA.Diagram Direction: IN Description: The diagram that is showing the parent element. If a user is showing a context menu outside a diagram, this could be null. |
Diagram Class |
Order |
EA.Diagram Direction: OUT Description: Allows controlling if and where the child diagrams specified in the parent rules are shown. A positive value means they will be shown after the items specified in this function. Zero means they are not shown at all. A negative value means that they are shown after the items specified in this function. |
Return Value
This function supports returning either a single string with multiple items specified by a ';', or an array of strings.
Each item can be one of these:
- "-" - inserts a separator
- Any other text - shows that text as the item, and if the user clicks on it the Add-In is responsible for creating the requested diagram in EA_OnMenuClick