Automatically populating a diagram when you create it

You can use the Populate Diagram window to automatically add elements and their relations to an existing and already populated class, object model, use case, or structure diagram.

About this task

IBM® Engineering Systems Design Rhapsody® automatically lays out the elements in an orderly and comprehensible manner.

To open the Populate Diagram window, do any of the following actions:

  • Right‑click a blank spot on the diagram in its drawing area and select Populate or choose Layout > Populate.
  • Right‑click the diagram in the model browser, and select Populate.
Note: Rhapsody does not change the location of existing elements, it just adds the new elements.

Procedure

  1. When you create your class, use case, object model, or structure diagram, on the New Diagram window, select the Populate Diagram check box and click OK.
  2. On Populate Diagram window, in the Add elements related to selected elements group, indicate how you would like Rhapsody to create the contents of the diagram:
    • For "For" relations populates the diagram with the selected elements, their outgoing relations, and the model elements that complete the relations
    • For "To" relations populates the diagram with the selected elements, their incoming relations, and the model elements that complete the relations
  3. In the Types of relations to draw group, select which types of relations you would like the product to use when creating the contents of the diagram:
    • Object model diagrams and structure diagrams: Instance, Association/Aggregation, Inheritance, Dependency, Link, and Anchor/Annotations
    • Use-case diagrams: Association, Generalization, and Dependency, and Anchor/Annotations
  4. In the Selection field, place a check mark next to each element you want to include in the new diagram. To select a package without selecting the elements it contains, right-click the package.
  5. In the Preferred Layout Style group, select the type of layout you would like the product to use when creating the diagram. If you select None, Rhapsody automatically chooses the best layout style according to the type of relations you have chosen to display.
  6. Click OK. The new diagram displays in the drawing area with all the selected elements added. You can then begin to add information to the new diagram.

Results

Note: When auto-populating a diagram, if you want Rhapsody to populate each class so it shows its attributes and operations, set the ObjectModelGE::Class::ShowAttributes and ObjectModelGE::Class::ShowOperations properties to All in the scope of the package or project.
Note: During reverse engineering with the Populate Diagrams check box selected, Rhapsody creates object model diagrams visualizing the elements added during reverse engineering. If you run reverse engineering later with the Merge existing package option, the product updates the visualized diagrams to show the new elements added and the dependencies between the diagram elements.
Note: The Populate feature does not support the adding of ports, though existing ports on the diagram will be preserved.