Enterprise Architect Add-in Framework Documentation
EA_OnPreDeleteElement notifies Add-Ins that an element is to be deleted from the model. It enables Add-Ins to permit or deny deletion of the element. This event occurs when a user deletes an element from the Project Browser or on a diagram. The notification is provided immediately before the element is deleted, so that the Add-In can disable deletion of the element.

Namespace: EAAddinFramework
Assembly: EAAddinFramework (in EAAddinFramework.dll) Version: 1.0.4064.9398

Syntax

C#
public virtual bool EA_OnPreDeleteElement(
	Repository Repository,
	EventProperties Info
)
Visual Basic
Public Overridable Function EA_OnPreDeleteElement ( _
	Repository As Repository, _
	Info As EventProperties _
) As Boolean
Visual C++
public:
virtual bool EA_OnPreDeleteElement(
	Repository^ Repository, 
	EventProperties^ Info
)

Parameters

Repository
Type: Repository
An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
Info
Type: EventProperties
Contains the following EventProperty object for the element to be deleted: - ElementID: A long value corresponding to Element.ElementID.

Return Value

Return True to enable deletion of the element from the model. Return False to disable deletion of the element.

See Also