Book a Demo

Author Topic: Custom Tagged Values by C# addin  (Read 5314 times)

rmartinezb

  • EA User
  • **
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Custom Tagged Values by C# addin
« on: November 11, 2016, 02:03:37 am »
Hi,

I'm programming an addin that generate some Archimate elements and I need to create some TV for each elements, but I need that some of them be read only.
How can I do that? I know how to create tagged values, but don't how to manage tagged value types through the automation interface. Any tip?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom Tagged Values by C# addin
« Reply #1 on: November 11, 2016, 07:13:31 am »
The default tagged values are stored in Repository.PropertyTypes. But I don't get what you mean by r/o.

q.

rmartinezb

  • EA User
  • **
  • Posts: 44
  • Karma: +1/-0
    • View Profile
Re: Custom Tagged Values by C# addin
« Reply #2 on: November 11, 2016, 08:02:13 pm »
I want to create tagged values through the API that can not be edited by EA users.

I would really use any system that save key / value pairs on elements that can not be edited by users, it does not have to be done using tagged values.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom Tagged Values by C# addin
« Reply #3 on: November 11, 2016, 08:17:36 pm »
AKAIK you can not prevent users from altering TVs only. If you can modify an element you can also modify a TV. You might write an add-in that checks for alteration (though not sure if you get a notification for altered TVs).

You should look into RefGUID TVs. These are linked to stereotyped elements so one can only select from a list. Also a simple drop-down is a possibility if you want to prevent people from typing random text in the TV values.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8107
  • Karma: +119/-20
    • View Profile
Re: Custom Tagged Values by C# addin
« Reply #4 on: November 14, 2016, 09:26:58 am »
http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/predefinedtaggedvaluetypes.html

Quote
Type=AddinBroadcast;
Values=YourAddinName;

Used to: Allow an Add-In to respond to an attempt to edit this Tagged Value by showing a dialog in which the value and notes can be edited.

Quote
Type=Const;
Default=Val;

Used to: Create a read-only constant value.