UML Modeling Techniques > Class modeling > Composite structure diagram > Adding an existing part to a composite structure diagram
  
Adding an existing part to a composite structure diagram
If you want to add a Part to a Composite Structure Diagram as a top-level item, you must do so through a drag-and-drop operation.
* 
After adding a Part to the diagram, you can use the View Options to show or hide the Part's Name, Full Name, Type, Multiplicity, Default and Stereotypes.
To add an existing part through the part toolbar button:
1. On the Structure Diagram Toolbar , click the Part button.
2. Right-click inside the item (Class, Data Type, Interface, Signal, Part or Port) in which you want to add the Part.
3. From the context menu, click the command for the Part (aggregate Role or Attribute) you want to add.
If Modeler displays the Select Object dialog instead of a context menu, the item you right-clicked does not contain any Parts.
4. If you want to rename the Part, type a new name.
5. If required, set the properties of the Part through its Property Pages.
Modeler adds the existing Part to the Composite Structure Diagram.
To add an existing part through a drag-and-drop operation:
1. Locate the Part (aggregate Role or Attribute) you want to add in a Modeler pane, and then drag the Part to free-space or a valid item (Class, Data Type, Interface, Signal, Part or Port) on the Composite Structure Diagram. Use the Parts pane to find Parts in context.
This mouse pointer means that the Part will be added to the diagram.
This mouse pointer means that the Part will be moved (rescoped) in to the target item.
This mouse pointer means that the Part will be copied to the target item.
2. If you want to display a top-level Part as a frame:
a. On the diagram, right-click the Part, and then click View Options.
b. Click the Parts pane, and then select the Show As Frame check box.
Modeler adds the existing Part to the Composite Structure Diagram.