Réserver une Démo
Pré. Proc.

EA_OnPreDropFromTree

When a user drags any kind of element from the Browser window onto a diagram, EA_OnPreDropFromTree notifies the Add-In that a new item is about to be dropped onto a diagram. The notification is provided immediately before the element is dropped, so that the Add-In can override the default action that would be taken for this drag.

Syntax

Function EA_OnPreDropFromTree (Repository As EA.Repository, Info As EA.EventProperties) As Boolean

The EA_OnPreDropFromTree function syntax contains these parameters.

Parameter

Type

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

Info

EA.EventProperties

Direction: IN

Description: Contains these EventProperty objects for the element to be created:

  • ID: A long value of the type being dropped
  • Type: A string value corresponding to type of element being dropped
  • DiagramID: A long value corresponding to the ID of the diagram to which the element is being added
  • PositionX: The X coordinate into which the element is being dropped
  • PositionY: The Y coordinate into which the element is being dropped
  • DroppedID: A long value corresponding to the ID of the element the item has been dropped onto
EventProperties Class

Return Value

  • Return True to allow the default behavior to be executed
  • Return False to override this behavior