Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.


EA_OnPreNewMethod notifies Add-Ins that a new method is about to be created on an element. It enables Add-Ins to permit or deny creation of the new method.

This event occurs when a user creates a new method on an element by either drag-dropping from the Project Browser, using the 'Operations' tab of the 'Features' dialog, or using the in-place editor on the diagram. The notification is provided immediately before the method is created, so that the Add-In can disable addition of the method.


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

The EA_OnPreNewMethod function syntax contains these parameters.



See also



Direction: IN

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

  • ReturnType: A string value corresponding to Method.ReturnType
  • Stereotype: A string value corresponding to Method.Stereotype
  • ParentID: A long value corresponding to Method.ParentID
  • ClassifierID: A long value corresponding to Method.ClassifierID

EventProperties Class



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

Return Value

Return True to enable addition of the new method to the model. Return False to disable addition of the new method.

Learn more