Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: McMannus on June 11, 2015, 08:52:44 am

Title: [EA12] EA_OnPreDropFromTree
Post by: McMannus on June 11, 2015, 08:52:44 am
Hi guys,

I read the docs concerning the above mentioned event, which says on http://www.sparxsystems.com/enterprise_architect_user_guide/12.0/automation_and_scripting/pre_new_events.html

"Creation of a new element by dropping onto a diagram from the Project Browser or Diagram Toolbox"

I tested this for the diagram toolbox, because this is the behavior which I'd need. However this is not fired for toolbox dragging but only for project browser dragging.

Did anyone experience the same issue?
Title: Re: [EA12] EA_OnPreDropFromTree
Post by: Eve on June 11, 2015, 08:55:02 am
The problem is the documentation.

The name of the function clearly indicates that it's only from the project browser.
Title: Re: [EA12] EA_OnPreDropFromTree
Post by: McMannus on June 11, 2015, 08:56:53 am
Thank you for clarification, Simon.
Is there any way of getting x and y coordinates as well for toolbox dragging?
Title: Re: [EA12] EA_OnPreDropFromTree
Post by: Eve on June 11, 2015, 09:00:19 am
Doesn't look like it. Neither EA_OnPreNewDiagramObject or EA_OnPostNewDiagramObject give coordinates.

So the question is, why do you need it? It sounds more like you want to be customizing the toolbox.
Title: Re: [EA12] EA_OnPreDropFromTree
Post by: RoyC on June 11, 2015, 09:32:39 am
The documentation has been corrected to only refer to dragging from the Project Browser.