The UML semantic defines only the UML metamodel. The modeling tool has its own structure of classes for UML elements representation in the diagram. The base class of this structure is com.nomagic.magicdraw.uml.symbols.PresentationElement. A presentation element is a textual or graphical presentation of one or more model elements.

Presentation elements are sometimes called symbols also.

In the metamodel, a PresentationElement is the com.nomagic.magicdraw.uml.BaseElement that presents a set of model elements to a user. It is the base for all metaclasses used for the presentation. All other metaclasses with this purpose are indirect subclasses of PresentationElement.

A current version of Open API provides just a basic structure of presentation elements:



Every presentation element can have children. For example, com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement has a collection of inner presentation elements. PresentationElement of some Package can have a collection of presentation elements for inner Package elements.

Current version PresentationElement API allows you to:

  • Access element bounds PresentationElement.getBounds()
  • Access a model com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element of a  presentation element PresentationElement.getElement(). A presentation element can have no Element, for example, a com.nomagic.magicdraw.uml.symbols.shapes.TextBoxView.
  • Access children PresentationElement.getPresentationElements()
  • Access properties of the element PresentationElement.getProperty(java.lang.String) PresentationElement.getPropertyManager().  The sample of properties would be the Suppress Operations property for a class presentation element, the Autosize property for any com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.
  • Select/unselect or access a selection state of the presentation element (PresentationElement.isSelected(), PresentationElement.setSelected(boolean)).

A subclass of presentation elements com.nomagic.magicdraw.uml.symbols.paths.PathConnector provides information about connected paths to the presentation element. To get a collection of connected paths to the presentation element, use the method PathConnector.getConnectedPathElements().