Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Thiyagaraj A on February 11, 2008, 03:32:05 am

Title: Dynamic Tagged Value type?
Post by: Thiyagaraj A on February 11, 2008, 03:32:05 am
I am creating an AddIn. I wanna add a taggedValue which accepts say only boolean values. I know we can do that Tagged Value Types in EA. But I need to know how to do that through AddIn APIs. Any helping hands?
Title: Re: Dynamic Tagged Value type?
Post by: thomaskilian on February 11, 2008, 03:54:59 am
I think it's up to you what values you stuff into the Tags via your code. Maybe I did not get the point ???
Title: Re: Dynamic Tagged Value type?
Post by: Thiyagaraj A on February 11, 2008, 04:23:53 am
Quote
I think it's up to you what values you stuff into the Tags via your code. Maybe I did not get the point ???


I am creating a template for the users. when they click an item in addIn menu a template will got created in the diagram. Diagram Objects will have tagged values. The values of those tags should be restrictable. say one element has a tag named isXXX. The values can be true or false. The user can select one among them. But when I add a tagged value through APIs it asks for the value, not the type of the tag.
Is there any way to do that?
Title: Re: Dynamic Tagged Value type?
Post by: thomaskilian on February 11, 2008, 05:01:48 am
Search the help for "default tag" (without quotes). The 3rd entry should be the one.
Title: Re: Dynamic Tagged Value type?
Post by: peter.zrnko on May 05, 2008, 05:25:18 pm
I think you refer to the Predefined Tagged Value Types (http://www.sparxsystems.com.au/EAUserGuide/predefinedtaggedvaluetypes.htm). But this about defining Predefined Tagged Value Types.

1
I want to create such tagged value using automation interface (using Visual Basic in MS Excel). Is it possible?

2
In fact I want to create a stereotyped attribute. The stereotype is defined in our MDG technology and has several predefined tagged values. I'm able to use automation interface to create an attribute, set its stereotype but no tagged values are generated automatically.
Is it possible to use automation interface to create a stereotyped attribute with tagged values according to the stereotype defined in a profile in a MDG technology?

If I can resolve this problem, there will be no need to solve the first problem  :)
Title: Re: Dynamic Tagged Value type?
Post by: thomas.kilian on May 05, 2008, 05:36:18 pm
1 AFAIK no
2 no idea
Title: Re: Dynamic Tagged Value type?
Post by: Frank Horn on May 05, 2008, 06:32:33 pm
Adding an attribute (or whatever) via API and giving it a stereotype defined in an MDG technology will not add the tagged values. There's supposed to be an "undocumented" command though (which I haven't yet tried out):

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1205431696/0
Title: Re: Dynamic Tagged Value type?
Post by: «Midnight» on May 05, 2008, 09:56:34 pm
And the undocumented command did not work - at least in some configurations - when it was first 'published.' At least for now, users are on their own if they go that route, since the command in question is not (yet) supported, nor is there any assurance it will eventually be incorporated into the API, or if so whether it will change in some fashion beforehand.

I was sort of hoping this one would be clarified and incorporated for EA 7.1, but such seems not to be the case.

Sigh...
Title: Re: Dynamic Tagged Value type?
Post by: peter.zrnko on May 05, 2008, 10:56:33 pm
Thanks for your replies. I'll synchronize tagged values manually outside of Automation interface.

It's a little bit terrible. Especially together with the bug that tagged values created with earlier versions of EA are duplicated by the synchronization process.