预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

EARules_AllowNesting

EARules_AllowNesting allows an Add-In registered to provide rules for a language to specify if two elements should be nested in the Browser window after being nested on a diagram.
This event occurs while a user drags one element onto another in a diagram.

Syntax

Function EARules_AllowNesting (Repository As EA.Repository, Language As String, Child as EA.Element, Parent as EA.Element, Diagram as EA.Diagram) As Integer
The EARules_AllowNesting function syntax contains these parameters.

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.

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.

Child

EA.Element
Direction: IN
Description: Specifies the element that has been graphically nested within another element.

Parent

EA.Element
Direction: IN
Description: Specifies the target element of a drag-and-drop operation within a diagram.

Diagram

EA.Diagram
Direction: IN
Description: The diagram that the move event has occurred on.

Return Value


  • Return a positive value to allow the nesting to occur

  • Return a negative value to use the base rules

  • Return zero to prevent the nesting from occurring