how to get value of tagged value

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

how to get value of tagged value

Postby KH » Tue Jun 12, 2007 6:47 pm

Hi,

I've set some tagged values for components which I have created. How can I
access the values of the tags/slots?

I've tried slot.getValues() and various methods related to it, but it didn't
seem to do the job.

Thanks.


KH
 
Posts Rating:

Re: how to get value of tagged value

Postby Martynas Lelevicius » Wed Jun 13, 2007 7:06 am

Hello,

StereotypesHelper hase a lot methods for working with stereotypes.
Here is the sample:

List tagValues = StereotypesHelper.getStereotypePropertyValue(element,
stereotype, "tagName");

Regards,
--
Martynas Lelevicius
Programmer
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT-49425, Kaunas
P.O. box 2166, LT-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail : marte
WWW: http://www.magicdraw.com

Martynas Lelevicius
 
Posts Rating:

Re: how to get value of tagged value

Postby KH » Wed Jun 13, 2007 3:24 pm

Thanks Martynas.

Another question I have is regarding adding a new JDialog. When I construct
a new JDialog with a submit button that when pressed will update the tagged
values. I created a session from within the event handler of the button and
tried placing it outside as well, but I still get an IllegalStateException
in the log. But despite having the exception, everything still works
accordingly. Do you have any idea what the cost might be?

Thanks.

"Martynas Lelevicius" <marte> wrote in message
news:16521278.1181746458236.JavaMail.tadjar@peleda...
> Hello,
>
> StereotypesHelper hase a lot methods for working with stereotypes.
> Here is the sample:
>
> List tagValues = StereotypesHelper.getStereotypePropertyValue(element,
> stereotype, "tagName");
>
> Regards,
> --
> Martynas Lelevicius
> Programmer
> No Magic Lithuanian Development Center
> Savanoriu pr. 363, LT-49425, Kaunas
> P.O. box 2166, LT-44011, Kaunas
> Phone: +370 37 324032 Fax: +370 37 320670
> E-mail : marte
> WWW: http://www.magicdraw.com


KH
 
Posts Rating:

Re: how to get value of tagged value

Postby Martynas Lelevicius » Thu Jun 14, 2007 3:26 am

Hi,

What is the message of IllegalStateException?

Regards,
--
Martynas Lelevicius
Programmer
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT-49425, Kaunas
P.O. box 2166, LT-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
E-mail : marte
WWW: http://www.magicdraw.com

Martynas Lelevicius
 
Posts Rating:


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 1 guest