3 4
Many of the drawing types in Visio incorporate automated layout behavior so that you don't have to manually rearrange connectors and shapes. For example, the dynamic connector can route itself around shapes that get in the way and find the best point to connect to shapes. It will also jump over other connectors that cross it. At some point, you will probably encounter the results of the built-in layout and routing behavior—which behaves logically for the most part but occasionally yields surprising results. Understanding how layout and routing works will make your drawings easier (and more fun) to revise.
The language for describing this behavior is a little peculiar. For example, almost all shapes can be detected by connectors and "routed around." In Visio-speak, shapes with this attribute are called placeable, which means simply that Visio recognizes they are there and tries to route lines around rather than through the shapes. The route that a connector can take varies depending on whether you create point-to-point or shape-to-shape connections, as Figure 3-6 shows. Most of the time, when a connector has extra bends or seems to have taken a circuitous route to a shape, the explanation lies with the type of connection that Visio is trying to preserve.
Figure 3-6. To maintain a point-to-point connection, a connector must bend to avoid the triangle. With a shape-to-shape connection, the connector can move.
How can you ensure good results when connecting shapes?
The shapes provided on the stencils for connected drawing types are already set to work in certain ways when it comes to automatic layout and routing. When you attach a connector to a 2-D shape, Visio makes that shape placeable by default, which means that as you move shapes, connectors can take the best new route to the shape. You can enable and disable placeable status for any shape you create by using the Placement tab in the Behavior dialog box, as Figure 3-7 shows.
Figure 3-7. To control a shape's layout behavior, select the Lay Out And Route Around option, and then specify the settings you want.
Follow these steps to access the placement settings for any shape:
Note
All the options are unavailable on the Placement tab in the Behavior dialog box.
If you select a 1-D shape or connector when you choose the Behavior command, the options on the Placement tab are unavailable, because only 2-D shapes are placeable. Connectors, by contrast, are routable. If you select a 2-D shape and the options are still unavailable, see which option is displayed in the Placement Behavior box. If Let Visio Decide is selected, all the other options are unavailable. Choose Lay Out And Route Around to make the rest of the options available.
With the Lay Out Shapes command, you can rearrange the shapes on your page in a completely new layout style and vary the spacing between shapes. For example, you can easily flip a vertical flowchart to change a top-to-bottom style to a bottom-to-top orientation, as Figure 3-8 shows.
Figure 3-8. With the Lay Out Shapes command, you can change the placement style for an entire diagram.
You can change the placement and connector styles separately for a diagram. Placement options affect the way Visio can lay out 2-D shapes. Connector options specify the style and direction of lines used between shapes. In theory, the combination of placement and connector options provides an enormous variety of layout styles, from tree to radial to circular patterns. In practice, only a few settings are relevant for a particular diagram type. For example, the radial placement style works well only for diagrams whose connectors have no implied direction, as in some network drawings. For best results, use the same placement and connector direction. In other words, don't mix a vertical placement direction with a horizontal connector direction. The results may be awkward.
To set the layout and routing style for a diagram, choose Shape, Lay Out Shapes. As you make selections in the Lay Out Shapes dialog box, the preview gives you an idea of the intended outcome, as Figure 3-9 shows. However, the results on the drawing page can vary depending on the direction of your connectors and whether your shapes use point-to-point or shape-to-shape connections.
Figure 3-9. To change the layout, depth, and routing style in a connected diagram, choose Shape, Lay Out Shapes.
In the Lay Out Shapes dialog box, you can set the following Placement options:
To customize the routing behavior of connectors, you can choose the following Connector options in the Lay Out Shapes dialog box:
InsideOut
When you work in a multiple-page diagram, you can specify different layout and routing settings for each page. The Lay Out Shapes command works in combination with a page's settings to control the way shapes and connectors are displayed. You can adjust the shape spacing and the connector routing to control Visio's behavior with more finesse.
If you want to crowd more shapes on a page or provide more space between connected shapes than Visio does by default, you can adjust shape spacing. Shape spacing comes into play when your diagram includes placeable shapes. Only placeable shapes move in response to the Lay Out Shapes command. To set spacing options for a page, choose File, Page Setup. On the Layout And Routing tab, click the Spacing button to display the Layout And Routing Spacing dialog box, as Figure 3-10 shows. Table 3-1 describes each option.
In past versions of Visio, the spacing options are called "block size" and "avenue size" because of the way they specify a map-like grid. Shapes are like city blocks, and the routes a connector can take when you use the Lay Out Shapes command are the avenues. It might help to envision blocks and avenues when you adjust the settings in this dialog box.
Figure 3-10. Use the Layout And Routing Spacing dialog box to adjust horizontal and vertical spacing for shapes and connectors.
Table 3-1. Layout and Routing Spacing Options
Option | Description |
---|---|
Space Between Shapes | Specifies the amount of space between placeable shapes when you use the Lay Out Shapes command. |
Average Shape Size | Determines the "block" that Visio uses to calculate optimum shape layout and the placement of reference lines when the dynamic grid is displayed. |
Connector To Connector | Specifies the minimum amount of space between parallel segments of connectors. |
Connector To Shape | Specifies the minimum amount of space between connectors and shapes. |
Tip
The Lay Out Shapes command doesn't lay out certain shapes in the diagram.
Only placeable shapes respond to the Lay Out Shapes command. If you create your own shape, and it isn't placeable, the connectors can't detect it and so won't route around it. To make any shape placeable, select the shape, choose Format, Behavior, and then click the Placement tab. For Placement Behavior, select Lay Out And Route Around. This setting enables the shape to take part in Visio's automatic layout and routing features. You can clear this check box for any shape to prevent connectors from routing around it.
If a connector takes one too many bends in its route through your diagram, you can adjust its path. A dynamic connector includes vertices on each corner (marked with a green diamond) and a midpoint on each segment (marked with a small green square with a darker green × in it), as Figure 3-11 shows. To change the position of a line segment, drag a vertex or midpoint.
Figure 3-11. To change the path of a connector, drag a vertex or midpoint.
Note
Where connectors cross in a diagram, you can specify the style of line jump that Visio uses, such as the arc shown in Figure 3-12. Line jumps make it easier to see the route a connector takes. To accommodate the needs of different business and technical drawing types, Visio includes several styles of line jump, including gap, square, and multisided options. You can customize the look of line jumps for all the connectors in your diagram or for an individual connector.
Figure 3-12. You can specify whether Visio displays a line jump where connectors cross.
Follow these steps to specify the line jump style: