To remove the given com.nomagic.magicdraw.uml.symbols.PresentationElement from the diagram, use the method com.nomagic.magicdraw.openapi.uml.PresentationElementsManager.deletePresentationElement(PresentationElement):

    PresentationElement element = ...; 
    SessionManager.getInstance().createSession("Test"); 
    PresentationElementsManager.getInstance().removePresentationElement(element); 
    SessionManager.getInstance().closeSession();

All related presentation elements with all children and connected paths will be removed too.

Related pages