Author Topic: TaggedValue and API  (Read 3022 times)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
TaggedValue and API
« on: October 14, 2012, 09:59:55 pm »
Hello,

I'm trying to get tagged value from an attribute : currentAttribute.TaggedValues.GetByName("length"), but could not find an appropriate collection to save it. What is the return type of this GetByName?

Thanks.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: TaggedValue and API
« Reply #1 on: October 15, 2012, 04:59:39 am »
GetByName is not supported for all objects. Check the API doc whether it works at all for attribute tags. If not, you have to write your own GetByName.

q.
« Last Edit: October 15, 2012, 04:59:57 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: TaggedValue and API
« Reply #2 on: October 15, 2012, 06:42:51 pm »
GetByName returns type Object, which you have to cast to whatever type is in your Collection.

So if you are using it on a collection of AttributeTag then you will have to cast it to that type.

Geert

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: TaggedValue and API
« Reply #3 on: October 16, 2012, 12:17:44 am »
Thanks.