EA_OnPreDropFromTree

When a user drags any kind of element from the Project Browser 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 the following elements:

Parameter

Type

Direction

Description

Info

EA.EventProperties

IN

Contains the following 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
 

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

Returns True to allow the default behavior to be executed. Return False if you are overriding this behavior.