Author Topic: How to trigger behaviour on Toolbox drop?  (Read 2515 times)

Ribeye

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
How to trigger behaviour on Toolbox drop?
« 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?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to trigger behaviour on Toolbox drop?
« Reply #1 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

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

Geert

Ribeye

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: How to trigger behaviour on Toolbox drop?
« Reply #2 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!