When you create a class, use case, object model, or structure
diagram, you can use the Populate Diagram feature
to populate the diagram automatically if there are existing model
elements.
Procedure
- 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.
- On Populate Diagram window, in the Create
Contents Of Diagram Using group, indicate how you would
like IBM® Rational® Rhapsody® to
create the contents of the diagram:
- Relations Among Selected populates
the diagram only with the selected elements and the relations between
them
- Relations From/To Selected populates
the diagram with the selected elements, their incoming and outgoing
relations, and the model elements that complete these relations
- Relations From Selected populates
the diagram with the selected elements, their outgoing relations,
and the model elements that complete the relations
- Relations To Selected populates
the diagram with the selected elements, their incoming relations,
and the model elements that complete the relations
- In the Types Of Relations To
Be Used 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
- 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.
- 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, Rational Rhapsody automatically
chooses the best layout style according to the type of relations you
have chosen to display.
- 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 Rational 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.