Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: r2 on April 17, 2018, 07:31:16 pm
-
Hi,
I have an EA profile and a toolbox with several stereotypes which I applied in the model. Now I updated the name, color and properties of the stereotypes in my profile, saved the toolbox and re-imported the updated MDG technology XMI file into the model. How do I update the existing elements in the model automatically? Is there a chance without a script? I assume since I changed the name of the (same) stereotype, there is no mapping between the elements.
Thanks
-
Just go to your stereotype in the toolbox and choose Synch from the context menu. Note that it only adds new TVs and does not remove existing ones.
q.
-
Well, if I use synch stereotype nothing happens apart from the tagged values. But I want to update the existing applied stereotypes in total, eg. <<name_old>> --> <<name_new>>, old color --> new color and so on. Any idea?
r2
-
You need to script that. EA has no idea that you change the name of a stereotype. So you need to run a script which knows about that. It's best anyway to have a new version of your profile and shift existing ones to the new. A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.
q.
-
A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.
This.
Now, someone who is somewhat familiar with EA might be forgiven for thinking that a stereotype's name is not its identity, since that's how most of EA works, but with stereotypes the (fully-qualified) name is in fact the identity. So you can't change it, what you're doing is deleting one stereotype and creating another. EA has no record of the change, and in fact no concept of a stereotype name change.
/Uffe
-
A change to a stereotype is not trivial and should only be made after well thinking about it, never on the fly.
This.
Now, someone who is somewhat familiar with EA might be forgiven for thinking that a stereotype's name is not its identity, since that's how most of EA works, but with stereotypes the (fully-qualified) name is in fact the identity. So you can't change it, what you're doing is deleting one stereotype and creating another. EA has no record of the change, and in fact no concept of a stereotype name change.
/Uffe
Thanks for your feedback. So there is no stereotype specific GUID available to start from.. and the only chance is to use a script that runs by the name as identifier? Is there a UML tool on the market that supports to some extend such a stereotype updating mechanism?
-
No, there is no GUID. Stereotypes are held in EA's memory. When scripting use StereotypeEx for the FQN of the stereotype. Regarding tools: probably nothing or in price areas where I don't work.
q.