MagicDraw 18.5 Documentation
Dragging files and elements
The drag-and-drop capability allows you to:
Drag files from your file system onto an element in the Model Browser or a symbol on a diagram.
- A hyperlink to the dragged file is automatically created.
- Dragged images are set as the Image property value of the element.
- If an image is dragged to a Stereotype, it is set as a Stereotype icon.
- Drag a project to the diagram pane to open the project.
- Drag source code files from your file system to the MagicDraw Code Engineering Set.
Drag any elements to any properties in the Specification window.
For example, you can drag a Class element from the Model Browser to the Type property in the Operation Specification window. That Class element is assigned as the Operation type in the Specification window.
- Drag any elements from the Specification window onto:
- An empty place on a diagram. In this case, the class symbol is created on the diagram.
- A shape on a diagram. In this case, a new attribute is created.
- An element in the Model Browser. In this case, a new model element is created.
- Drag a property to create an association:
- Drag a property from the classifier (for example, class, component, subsystem) compartment to a diagram pane.
Drag a property from the Model Browser to a diagram pane.
In both cases, an association is drawn from the classifier to a property's type. The property itself is set as an association end. If the classifier symbol is not present on the diagram, it is added as a result of the created association.
If selected model elements are not compatible with an open diagram, you will not be allowed to drag these model elements.
Dragging in diagrams
You can drag-and-drop relationships to a diagram. The path for the relationship with shapes at the end of the path and the path between the shapes (if shapes at the end of the path are already represented on the diagram) is created.
You can also drag-and-drop model elements to a note or a text box symbol in a diagram to add a hyperlink to that element.
Dragging in Sequence diagrams
In a Sequence diagram you can:
The Lifeline type must have or inherit this Operation.
- Drag an Interaction to an Interaction Use. The Interaction will be set as the Refers To element.
- Drag a Signal to a Message. The Message is converted into a Send Signal Message and the Signal is assigned to the Message.
Dragging in State Machine diagrams
- In a State Machine diagram you can drag an Event element to a Transition element. A Trigger with this Event is created for the Transition element.
- You can drag behaviors from one state shape to another.
Dragging in Activity diagrams
In an Activity diagram you can:
Drag a Signal onto an Activity diagram to create a Send Signal Action.
Drag a Signal onto a Send Signal Action to set or change the Signal.
Drag a Signal onto an Accept Event Action to set or change the Signal.
Once the Signal is assigned to the Accept Event Action, the Signal Event for the diagram and the Trigger for the action will be created automatically.
Drag an Event onto an Activity diagram to create an Accept Event Action.
Drag an Event onto an Accept Event Action to set the Event.
Drag a Signal Event to an Activity diagram to create an Accept Event Action.
Drag a Property, Actor, Class or Instance Specification to an Activity diagram by using the right mouse button. From the shortcut menu, select to create a Swimlane, Central Buffer Node, or available Actions.