Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Chats on June 20, 2013, 07:34:17 am
-
Hi,
I'm attempting to extend a meta model and want to extend connectors - like dependency or association etc. However I want it to be used only between two previously defined stereotypes and not be able to reverse direction etc by default.
Say if two stereotypes are already defined: A and B, I want to create a connector that can be only be used from A to B and not B to A.
Looking through the MDG stuff, I couldn't find anything that could restrict stereotype source and destination of a connector. Even trialing out the editor in EA 10 (currently using 9.3).
Closest thing I found was the ConnectorEnd in the object model (clientEnd and supplierEnd of a connector object). StereoType and StereoTypeEx, but not sure if these properties can be somehow set through the MDG stuff. These seem to be more run-time properties set as a diagram being drawn.
I was wondering if anyone else has done this before where they have restricted the source / destination stereotype of connectors? or if this is not possible with EA - as I'm used some other modelling tools which prevents users from drawing incorrect diagrams.
Thanks,
Chats
-
Search the help file for "quick AND linker AND mdg" (without quotes). The 2nd result (Add QL ...) might be what you're looking for.
q.
-
Hi Q,
thanks for your quick reply.
I was hoping there was bit more comprehensive way of preventing wrong wring of entities.
I want to keep the connectors in the toolbox, quick links doesn't prevent someone using a connector from the toolbox and wiring it the wrong way around or using a completely invalid connector.
However, if there's no other way, I will use this method and remove all the connectors from the toolbox, then only way to wire up is using the quick links.
thanks
Chats
-
The only other way is using an add-in catching the OnPreNewConnector event.
q.