NEW RELEASE! The 2022x Refresh2 Hot Fix 3 was released on February 28, 2025. For more information, see 2022x Refresh2 Hot Fix 3 Version News.

Every com.nomagic.magicdraw.uml.symbols.PresentationElement can access selected elements or change their own selection status.

Collecting selected presentation elements in a diagram

    Project project = ; 
    DiagramPresentationElement diagram = project.getActiveDiagram(); 
    List<PresentationElement> selected = diagram.getSelected();

Selecting element in a diagram

    presentationElement.setSelected(true);

Presentation element selection events page describes selection change events


Activity

All
Personal filters
All