Author Topic: RoleTag and notes  (Read 3513 times)

MeryemAdb

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
RoleTag and notes
« on: June 16, 2015, 06:38:06 pm »
Hello,

In my AddIn I set tagged values for classes, attributes, connectors and connector ends.

I think one user just had a bug because the value to set was too big (for an attribute), so I'd like to improve the method used to create or edit the tagged value. If the value has more than 255 characters, I'd like to use "<memo>" as the value and put the actual value in the notes (as is explained in the documentation).

The only problem remaining is that this method is not explained in the documentation for RoleTags, and they do not have a Note attribute. I cannot use the method from my AddIn, while it is possible to set a Note for a RoleTag from EA interface.

What should I do ? I am currently using EA version 11 but I'd want a solution that works for versions 10 and higher.

Thanks in advance.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: RoleTag and notes
« Reply #1 on: June 16, 2015, 06:54:35 pm »
Simply put the text "<memo>"  in the value of the TV. Then EA will use the Notes.

q.
« Last Edit: June 16, 2015, 06:54:49 pm by qwerty »

MeryemAdb

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: RoleTag and notes
« Reply #2 on: June 16, 2015, 06:57:28 pm »
Yeah but I do not know how to create a Note for a RoleTag (tagged value on a connector end).

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: RoleTag and notes
« Reply #3 on: June 16, 2015, 07:23:11 pm »
If it isn't available in the API then you can send in a feature request, and in the meantime use Repository.Execute with an sql update statement.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: RoleTag and notes
« Reply #4 on: June 16, 2015, 08:13:50 pm »
It seems they forgot that in the API and you're the unlucky guy finding out (or needing) that first. As Geert said: Feature request.

In the mean time you can look into t_taggedvalue. The memo is stored like
Code: [Select]
<memo>$ea_notes=hello;
in the Notes column. The part before $ea_notes is the value displayed  and the part after is the memo ( :-X about that format). Make sure the column Notes in t_taggedvalue is capable of storing more than 256 chars. Else you'r be doomed anyway.

q.

P.S. Just verified that Notes can hold more than 256 chars.
« Last Edit: June 16, 2015, 08:15:39 pm by qwerty »

MeryemAdb

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: RoleTag and notes
« Reply #5 on: June 16, 2015, 08:17:39 pm »
Thanks to the both of you. I now have the ability to do what I want (now to decide if I will do it or deem it not that useful...)