Removing PresentationElement from Diagram

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Removing PresentationElement from Diagram

Postby Raul Lorenzo » Mon Apr 03, 2006 4:33 pm

Hello,

I am trying to remove a PresentationElement with

p_elemento_encontrado.dispose();
p_elemento_encontrado.removePresentationElement(p_elemento_encontrado);

but the element doesn´t remove from diagram. (I don´t want to erase from
Model) Why?

Note:
(p_elemento_encontrado!=null) always

Thanks.
Raul Lorenzo
 
Posts Rating:

Re: Removing PresentationElement from Diagram

Postby Tomas Pugzlys » Tue Apr 04, 2006 3:43 am

Hello,

You should use the following method:
PresentationElementsManager.deletePresentationElement(PresentationElement
element)

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,
>
> I am trying to remove a PresentationElement with
>
> p_elemento_encontrado.dispose();
> p_elemento_encontrado.removePresentationElement(p_elemento_encontrado);
>
> but the element doesn´t remove from diagram. (I don´t want to erase from
> Model) Why?
>
> Note:
> (p_elemento_encontrado!=null) always
>
> Thanks.
>

Tomas Pugzlys
 
Posts Rating:


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 0 guests

cron