Book a Demo

Author Topic: Tagged Values of parameters  (Read 5075 times)

M.SoddSliver

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Tagged Values of parameters
« on: April 13, 2010, 05:57:22 pm »
I'm writing an Add-In for EA 7.1. In this template we do several transformations. For one of these transformations I would like to use the tagged value of a parameter. In the EA GUI it's possible to set these tagged values. However, I can't seem to find a collection in the parameter com object.

Can anyone tell me how I can access these tagged values from code?

M.SoddSliver

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Tagged Values of parameters
« Reply #1 on: April 13, 2010, 06:17:42 pm »
Stupid me, I see the same question in the topic list now! Couldn't find it with the search function though. I have my answer :)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged Values of parameters
« Reply #2 on: April 13, 2010, 06:18:29 pm »
I think you are right that they are not exposed through the API.
You can however read their values trhough an SQL query. (Repository.SQLQuery)
They are stored in the t_taggedvalue table with BaseClass = 'OPERATION_PARAMETER'

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged Values of parameters
« Reply #3 on: April 13, 2010, 06:19:26 pm »
Quote
Stupid me, I see the same question in the topic list now! Couldn't find it with the search function though. I have my answer :)

You have to use the search button on the top left. That works a lot better then the search box on the top right.

Geert

M.SoddSliver

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Tagged Values of parameters
« Reply #4 on: April 13, 2010, 06:21:30 pm »
Thanks a lot! :) I will check out that SQL statement.

M.SoddSliver

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Tagged Values of parameters
« Reply #5 on: April 13, 2010, 06:57:19 pm »
I have built up the query, and here is a copy of the result:

  <?xml version="1.0" ?>
- <EADATA version="1.0" exporter="Enterprise Architect">
- <Dataset_0>
- <Data>
- <Row>
  <PropertyID>{45E7C16C-AF52-47ee-BEA2-3003A5604971}</PropertyID>
  <ElementID>{EC9879F8-E633-40bb-99BC-4223E6AC2079}</ElementID>
  <BaseClass>OPERATION_PARAMETER</BaseClass>
  <TagValue>ReturnType</TagValue>
  <Notes>Object</Notes>
  </Row>
  </Data>
  </Dataset_0>
  </EADATA>

I have several problems with this result:

- The TagValue doesn't represent the value of the tag but the TagName
  I can't find the actual value of the tag? Any idea or query to retrieve this value?
- Also the default value for notes seems to be 'Object', however, I did add actual notes! Any idea? They must be stored somewhere in the database

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged Values of parameters
« Reply #6 on: April 13, 2010, 07:13:18 pm »
What kind of tagged value did you use?
In my test case I just typed the name of the tagged value and a text value.
The name indeed appeared in the tagValue column, and the value appeared in the notes column.

But I can imagine, that if you have a RefGUID type of tagged value that this is stored differently.

Geert

M.SoddSliver

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Tagged Values of parameters
« Reply #7 on: April 13, 2010, 08:21:00 pm »
It does work now :) Thanks for the input. The notes column does contain exactly what i want to have.
« Last Edit: April 13, 2010, 08:25:59 pm by M.SoddSliver »