Laying Out a Diagram Automatically
Contents
- 1 To set up the diagram layout algorithm
- 2 To lay out a diagram using the selected layout algorithm
- 3 To prepare the diagram layout for printing
- 4 To optimize sizes of node elements
- 5 To show or hide compartments in node elements
- 6 To show or hide members in compartments
- 7 To streamline links removing bending points
- 8 See Also
Go Up to Customizing Diagram Appearance and Viewing Diagrams
In the Diagram View, the Layout submenu of the context menu provides commands for automatic layout. The commands of the context menu of diagrams lay out all elements of the diagram and the commands of the context menu of diagram elements lay out only the selected diagram elements.
The following Layout submenu commands can be available: Do Full Layout and Layout Selected Elements, Layout for Printing, Route All Links and Route Links, Optimize Sizes, Expand All, Collapse All, and Brief View.
To set up the diagram layout algorithm
- On the main menu, choose Tools > Options; the Options dialog box opens.
- In the left-hand pane, select the Modeling > (level) > Diagram > Layout command; the Layout page opens.
- In the Layout algorithm option, select the desired diagram layout algorithm. Available layout algorithms are:
Standard
,Hierarchical
,Orthogonal
,Spring Embedder
,Tree
, and<autoselect>
. See the descriptions of these algorithms and their options in Diagram Layout options. - Expand the node for the desired algorithm and specify the algorithm-specific options (if any).
- Click OK to apply the changes.
- Result: You can observe the results of applying the selected layout algorithm after you execute one of the Do Full Layout or Layout Selected Elements commands on the diagram.
- Tip: To enable the layout of the inner substructure in diagrams, select
True
in the Recursive layout option in the Layout page of the Options dialog box.
To lay out a diagram using the selected layout algorithm
- In the Diagram View, right-click the diagram background (or one of the selected elements).
- In the Layout submenu, click Do Full Layout (or Layout Selected Elements).
- Result: The Modeling lays out all elements on the diagram (or all selected elements) according to the layout algorithm defined for the current diagram in the Layout page in the Options dialog box.
To prepare the diagram layout for printing
- In the Diagram View, right-click the diagram background.
- In the Layout submenu, click Layout for Printing.
- Result: The Modeling lays out all diagram elements, optimizing the diagram for printing. The Modeling ignores the layout algorithm selected for this diagram in the Layout page. All node elements will be positioned so that each element can be printed on one page.
To optimize sizes of node elements
- In the Diagram View, right-click the diagram background (or one of the selected elements).
- In the Layout submenu, click Optimize Sizes.
- Result: The Modeling enlarges or shrinks all node elements on the diagram (or all selected node elements) to the optimal sizes, leaving enough space for their labels and any sub-elements they may contain.
To show or hide compartments in node elements
- In the Diagram View, right-click the background (or right-click one of the selected elements). The context menu containing the Layout submenu opens.
- In the Layout submenu, set the check mark before the Brief View menu item.
- Result: All container elements in the diagram (all selected container elements) appear with hidden compartments.
- Tip: To show compartments, clear the check mark before the Brief View menu item.
To show or hide members in compartments
- In the Diagram View, right-click the diagram background (or right-click one of the selected elements.)
- In the Layout submenu, click Expand All or Collapse All. All elements in the diagram show (or hide) all internal members in all compartments (or in compartments of selected elements).
To streamline links removing bending points
- Right-click in the Diagram View; the context menu opens.
- If you right-click the diagrams background, then the Layout submenu provides the Route All Links command.
- If you right-click an element, then the context menu provides the Route Links command.
- Click the available Route command (if such command is available).
- The Route All Links command streamlines all links (removing any bending points) on the diagram.
- The Route Links command streamlines all links (if any) connected with the selected element.
- Result: This streamlines all the links on the diagram (or all links connected with the selected element), removing bending points.
- Tip: You also can manually drag bending points on links.