Reading stereotype constraints from custom profile

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Reading stereotype constraints from custom profile

Postby Valdemar Blazevic » Sat Jul 07, 2007 3:52 pm

Hello,

I created a new profile(module) with Stereotypes. I also specified
constraints for some of them (name=specification pairs). How can I access
this constraint information using OpenAPI? Please provide some code
sample(s).

Thank you in advance.

Regards,
Valdemar
Valdemar Blazevic
 
Posts Rating:

Re: Reading stereotype constraints from custom profile

Postby Martynas Lelevicius » Mon Jul 09, 2007 12:45 am

Hello,

Use this:
String name = constraint.getName();
String specification = ModelHelper.getValueString((ValueSpecification)
constraint.getSpecification());

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 2 guests