Show/Hide Stereotype, Property in PresentationElement

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Show/Hide Stereotype, Property in PresentationElement

Postby Raul Lorenzo » Thu Mar 23, 2006 10:55 am

Hello,

Which method should I use to let show the stereotypes applied to a
Presentation Element? I mean, if I select a Presentation Element from
MagicDraw and click with right button, I can check in/out Show
Stereotypes, Show Marks or show name (in includes per example) and then
the diagram changes its presentation.

Thanks
Raul Lorenzo
 
Posts Rating:

Re: Show/Hide Stereotype, Property in PresentationElement

Postby Tomas Pugzlys » Mon Mar 27, 2006 3:20 am

Hello,

You may turn on/off a stereotype name showing by setting
PropertyID.SHOW_STEREOTYPE property.

Here would an example:
PropertyManager properties = (PropertyManager)
propertyShape.getPropertyManager().clone();

((BooleanProperty) properties.getProperty(
PropertyID.SHOW_STEREOTYPE)).setValue(true);

PresentationElementsManager.getInstance().setPresentationElementProperties(propertyShape,
properties);

Regards,
--
Tomas Pugzlys
Programmer
No Magic Lithuanian Development Center
Savanoriu pr. 363- IV, LT-49425, Kaunas
P.O. box 2166, LT-44011, Kaunas
Phone: +370 37 324032 Fax: +370 37 320670
e-mail : tomasp
WWW: http://www.magicdraw.com
--
MagicDraw - UML Made Simple

nntp://news.nomagic.com/nomagic.products.magicdrawuml.openapi wrote:
> Hello,
>
> Which method should I use to let show the stereotypes applied to a
> Presentation Element? I mean, if I select a Presentation Element from
> MagicDraw and click with right button, I can check in/out Show
> Stereotypes, Show Marks or show name (in includes per example) and then
> the diagram changes its presentation.
>
> Thanks
>

Tomas Pugzlys
 
Posts Rating:

Re: Show/Hide Stereotype, Property in PresentationElement

Postby Raul Lorenzo » Mon Mar 27, 2006 10:58 am

Thanks, now, the only thing I need is to know what is each
PropertyID.SHOW_??????? and use what I need. I think this could be a
learning with a test/error procedure.

Thanks about all, really.

Tomas Pugzlys escribió:
> Hello,
>
> You may turn on/off a stereotype name showing by setting
> PropertyID.SHOW_STEREOTYPE property.
>
> Here would an example:
> PropertyManager properties = (PropertyManager)
> propertyShape.getPropertyManager().clone();
>
> ((BooleanProperty) properties.getProperty(
> PropertyID.SHOW_STEREOTYPE)).setValue(true);
>
> PresentationElementsManager.getInstance().setPresentationElementProperties(propertyShape,
> properties);
>
> Regards,
Raul Lorenzo
 
Posts Rating:


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 0 guests

cron