Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uwe Krüger on July 31, 2012, 05:21:07 pm

Title: UML Profiles and Scripts
Post by: Uwe Krüger on July 31, 2012, 05:21:07 pm
We use UML Profiles with tagged values. For an element with the UML Profile applied, I can access the tagged values in a script, identification can be done by the (readonly) FQName “Namespace::Name”. But how can I apply the UML Profile from within a script. Setting the stereotype doesn’t help, as I cannot add the tagged values with the right FQName. As a workaround I have split my script into two and I run the first script, then apply the Profile, then run the second script, but I think there should be a better way.  

Can anyone give me a clue?

Thanks in advance
Uwe
Title: Re: UML Profiles and Scripts
Post by: qwerty on July 31, 2012, 06:48:21 pm
Try
Code: [Select]
bool Repository.SynchProfile (string Profile, string Stereotype)
— Synchronizes Tagged Values and constraints of the UML Profile for Stereotype.

q.
Title: Re: UML Profiles and Scripts
Post by: Uwe Krüger on July 31, 2012, 09:17:58 pm
Thank you. This is what I was looking for, works fine for me.