Book a Demo

Author Topic: Access PropertyType from Profile  (Read 5162 times)

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Access PropertyType from Profile
« on: April 03, 2014, 07:42:52 pm »
Dear,

I am trying to figure out how I can access the details of a tagged value type using the AI.

In my project I have a tagged value with a propertyGUID and as fas as I have figured out so far, this is the link to the Tagged Value Type defined in the profile used by my project.

However, I need to access this tagged value type (and it seems that this is possible since there is a PropertyType class which has a field Details) but I don't know how.

The PropertyTypes collection of the repository object is empty, so where can I use the propertyGUID to access the tagged value type?

thx.

Lars

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Access PropertyType from Profile
« Reply #1 on: April 03, 2014, 10:32:08 pm »
Maybe you see inherited tags?

q.

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Access PropertyType from Profile
« Reply #2 on: April 03, 2014, 11:23:20 pm »
that's not quite what i did.

In my UML profile I created some new Tagged Value Types (call it ConstTV) using Settings -> UML Type -> Tagged Value Types. I used this because it allows to create constant tagged values. This can be done by specifying:

Type=Const;
Default=....

in the Details Inputbox.

Then I created a stereotype (call it SpecialST) in the UML profile (which extends from another stereotype in another uml profile). And then I added an Attribute to this stereotype SpecialST with the name ConstTV (so it references the new tagged value (see above).

Now when I load my UML profile (using an MDG) I can create new elements of type SpecialST and in the Properties Dialog of this element I see a tagged value which has the name UMLProfile::ConstTV. It also shows as value what I specified after Default= (see above).

So far so good.

Using AI I can iterate throught the tagged values. The funny things start when I reach UMLProfile::ConstTV. It only has a useful value in the Name field and a PropertyGUID. No Value which I have expected to be what follows Default=.

So, the question for me is: how can I use the PropertyGUID to access the tagged value type definition (see above)? Unfortunately I cannot find it in Repository.PropertyTypes (which could have been a reasonable place from my perspective....)


Lars

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Access PropertyType from Profile
« Reply #3 on: April 04, 2014, 01:29:32 am »
I have to think over that later. For now: the MDG data are loaded temporarily and are not moved into Repository.PropertyTypes.

q.