Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: fginfrance on October 09, 2010, 08:35:18 am
-
Hi,
I am starting with profiles, shape scripts and stereotypes.
I have managed to create 2 stereotypes on "Class" type (lets call them 'A' and 'B' ) and 1 for a connector..
Now I am looking for a way to restrict the usage of my connector in a way, that only connections of form 'A' --> 'B' are allowed.
'B' --> 'A', 'B'-->'B' or 'A' --> 'A' would be illegal and ideally generate a warning (as the standard Msgbox which tells that a link is not valid UML).
I supposed it would be somewhere in the use of 'Constraints', but could not find the solution.
Can anybody give me a hint?
Thank you in advance!
fginfrance
-
Unfortunately, not possible out of the box. But you can create an add-in that implements the EA_OnPreNewConnector broadcast handler and perform your validation in there. Search the help for EA_OnPreNewConnector for full details...
-
Hi KP,
thanks for the hint.
Will do as proposed.
Best regards
fginfrance