Spacing and Aligning Components Automatically

You can use automatic algorithms to space, align, or space and align selected components or all components in a diagram. This allows you to optimize the spacing of components and to get a better alignment of components globally.


Before you begin: From the Package Browser, activate an editable class.
Notes:
  • The class must be editable.
  • The commands work only on components, not on graphical primitives like lines or rectangles.

The class and its components are displayed both from the diagram layer and from the Component Browser.

See Also
Aligning, Distributing, and Resizing Components
  1. To select which components to work on:
    • To work on all components, make sure no component is selected.
    • To work on a selection of components, multi-select these components. See Selecting a Component.
  2. To space the components, from the Diagram section of the action bar, click Auto Space .
    The selected components are automatically spaced in the diagram.
    Note: The size of the components is not modified.
  3. To align the components globally, from the Diagram section, click Auto Align .
    The selected components are automatically aligned in the diagram, in both x and y direction.
    Notes:
    • Components that you have previously aligned by other commands may not be aligned to each other anymore, they may be aligned with other components depending on the algorithms.
    • For manually well aligned classes you may not improve the layout by this command.
    • The size of the components is not modified.
  4. To both space and align the components globally, from the Diagram section, click Auto Align And Space .
    The selected components are automatically both spaced and aligned in the diagram, in both x and y direction. The notes for each command above applies.