Book a Demo

Author Topic: Apply Stereotype  (Read 3821 times)

bctm

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Apply Stereotype
« on: December 07, 2012, 03:02:17 am »
Hi,

I'm creating with a C# AddIn a new element (UseCase) and want to apply a predefined stereotype with attached TaggedValues to this element.

Of course it isn't a problem to set the stereotype via Element.Stereotype = "", but this doesn't apply the stereotype to the UC-element. It just populates the stereotype field.

What can I do to get the TaggedValues and eventually the styles?

I'm using EA 8, I've seen that in the UserGuide for EA9 there is a "SynchProfile" method for the Repository object, but this method isn't available in EA8.

Thanks for your help.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Apply Stereotype
« Reply #1 on: December 07, 2012, 04:30:59 am »
I guess you have to upgrade. It's (almost) impossible to create the tagged values for a certain MDG. I explained that in my Inside EA book pg. 35:
Quote
As mentioned above there’s some magic with GUIDs for tagged values that come from a MDG profile. These look exactly like ‘normal’ GUIDS:
{aaaaaaaa-aaaa-aaaa-bbbb-bbbbbbbbbbbb}
Here the a and b hex codes are not completely random. Only the b part is completely random, but the a part is a hash code computed individually per profile. The hash algorithm is internal to EA and unfortunately not known.

q.