Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ribeye on November 25, 2023, 12:57:01 pm

Title: How to trigger behaviour on Toolbox drop?
Post by: Ribeye on November 25, 2023, 12:57:01 pm
I have a profile, diagram and toolbox defined in my MDG.

When a user drags one of the stereotypes from the toolbox onto the diagram we need to trigger some behaviour. Specifically to set the value of one or more of the tags from the stereotype. In the future that could be other functions, like asking the user for more info.

Have searched sparx docs, SO and Thomas Killans books with no luck.

This must be a common requirement - what have I missed?

Title: Re: How to trigger behaviour on Toolbox drop?
Post by: Geert Bellekens on November 25, 2023, 11:23:18 pm
There are a number of "triggers" you can implement in an add-in to execute some behavior:

https://sparxsystems.com/enterprise_architect_user_guide/16.1/add-ins___scripting/post-new_events.html (https://sparxsystems.com/enterprise_architect_user_guide/16.1/add-ins___scripting/post-new_events.html)

You can implement them in
- a regular add-in
- a model-add-in
- an EA-Matic script

Geert
Title: Re: How to trigger behaviour on Toolbox drop?
Post by: Ribeye on December 07, 2023, 09:26:58 am
Thanks Geert, a whole section of documentation I could not find. The sooner they replace me with an AI Bot the better!