Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: solenn on April 11, 2014, 01:03:03 am

Title: Profile mdg and tagged values
Post by: solenn on April 11, 2014, 01:03:03 am
Hello,

I have created a profil mdg and I have created tagged values for a particular stereotype.

For exemple, my profil is named : "MyProfil".
I have created a stereotype : "MyStereotype"
I have 2 tagged values for my stereotype : "tag1" and "tag2".

When I create an element with stereotype "MyStereotype", in properties windows I have an item "MyProfil" with tagged value "tag1" and "tag2".

If with my C# code I create an tagged value (ex: "tag3") in this element, it appears in the item "Tagged Values" in properties windows of my element.

If with my code C#, I create an tagged value "MyProfil::tag4" in this element, it appears in the item "MyProfil" in properties windows of my element. The problem is the name of this tagged value is "MyProfil::tag4" while the other tagged values are well written "tag1" and "tag2".

How can I do with C# code to create my tagged values in the item "MyProfil" in properties windows of my element without "MyProfil::"?

Thanks a lot for your help.
I use EA 10.0 build 1009.

Solenn
Title: Re: Profile mdg and tagged values
Post by: qwerty on April 11, 2014, 04:42:53 am
I guess you can't without doing some t_xref black magic. The tags created from a profile have some extra information stored in t_xref which is not transparent. Create one element from your MDG in an empty repository and have a look into t_xref. Maybe you can guess what you need to do.

q.
Title: Re: Profile mdg and tagged values
Post by: solenn on April 11, 2014, 06:58:04 pm
Hello,

In fact, I used the method :
repository.CustomCommand("Repository", "SynchProfile", "Profile=MyProfil;Stereotype=MyStereotype;");

It synchronizes my element with the good stereotype.

Thanks a lot for your answer,
Solenn