Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: max on April 01, 2021, 08:39:20 pm
-
I want to create several scripts that get triggered by certain events (EA_OnPostNewElement, EA_OnContextItemChanged etc.). Is it only possible to achieve this by using add-ins? I would prefer to use the scripts, because these I can share them directly with all my collegues. With the add-ins it is really laborious to do that, due to the needed admin privileges and that each user would have to integrate it on its own seperately (as far as I understood the process). I also looked into the workflow scripts and with these it is possible to catch some events (AllowStatusUpdate, PreAllowPhaseUpdate, AllowPhaseUpdate, CanEditStatus...). Is there a documentation on these workflow events?
To summarize it, I basically wanted to create a way to do some background checks which are triggered by events i.e. :
- that the name of a new element is not used already
- that when a status of a requirement is changed all it dependend (needed by) "child" requirements statuses are also changed accordingly
-
Geert has something to offer (just in the unlikely case he might miss this one ;-). Just explore his product palette.
q.
-
You can either
- write your own addin
- write a Model-Addin script (Javascript only)
- Install EA-Matic and write a script in either VBScript or JScript : https://bellekens.com/ea-matic/ (https://bellekens.com/ea-matic/)
For checking duplicate names I already have an example: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Projects/EA-Matic%20Scripts/PreventDuplicates.vbs (https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Projects/EA-Matic%20Scripts/PreventDuplicates.vbs)
Geert
-
Hi,
yes I already wrote my own add-in and used your example on PreventDuplicates as an template. It is all working great, I only have the issue about sharing the add-in with all my collegues. When using your toolpack EA-Matic, every user would have to install it on their own (without needing admin privileges), right?
-
Yes, EA-Matic (or any other add-in) should be installed for every user.
The installation requires elevated rights.
Geert
-
Thanks! I will give that a try.