Laying Out Shapes Automatically

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.

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?

  • Create shape-to-shape connections whenever possible.
  • Make sure the begin point and endpoint on a connector align with the direction of the diagram you're creating.
  • Make sure that endpoints are properly connected. When you select a connector, its endpoints turn red if they're connected to another shape.

Setting Up Shapes for Automated Layout

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.

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:

  1. Select a 2-D shape, and then choose Format, Behavior.
  2. Click the Placement tab.
  3. To disable placement behavior, select the Do Not Lay Out And Route Around option in the Placement Behavior list. Otherwise, select Lay Out And Route Around to make the following options available:
    • Do Not Move During Placement. Select this option to prevent a shape from moving at all when you use the Lay Out Shapes command.
    • Allow Other Shapes To Be Placed On Top. Select this option to allow Visio to place other shapes on top of the selected shape, if need be, during automatic layout.
    • Move Shapes On Drop. Use this option to specify a shape's plow behavior, which controls how a shape reacts to the proximity of other shapes. As the name suggests, you can use this setting to allow a shape to plow all other shapes out of its way when it's placed near them, or if they get too close.
    • Interaction With Connectors. Use these options to allow connectors to route straight through a shape (either horizontally or vertically), rather than around them.

Note


You can make a shape immune to the plow settings of another shape by selecting Do Not Allow Other Shapes To Move This Shape Away On Drop. Shapes for which this option is set don't move when other shapes are dragged onto the page, regardless of the other shapes' settings.


Troubleshooting

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.


Setting Layout Style, Depth, and Routing

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.

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.

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:

  • Style. Select an option to place shapes in a radial, circular, or traditional flowchart/tree pattern.
  • Direction. Select an option to orient shapes from top to bottom, bottom to top, left to right, or right to left. Specifically, the shape at the begin point of a connector is placed in a position relative to the shape at the endpoint.
  • Depth. Select an option to fit a number of shapes optimally on the page. Specifically, Depth refers to the number of levels (as in a hierarchy) of a diagram. Choose Shallow to group shapes well, even if that means taking up more space. Choose Deep if space is tight. If you have few shapes, or extra space on the page, you may not see a difference between these settings.

To customize the routing behavior of connectors, you can choose the following Connector options in the Lay Out Shapes dialog box:

  • Style. Select an option to determine the path connectors take between shapes. Although some styles are associated with a particular drawing type, you can select any style you like.
  • Direction. Select an option to change where connectors attach to shapes. For example, choose Left To Right to attach connectors to the left and right sides of 2-D shapes. In most cases, this setting should match the Placement Direction setting.
  • Appearance. Use this setting to specify straight or curved connectors.
  • Apply Routing Style To Connectors. With this option you can apply settings to all the connectors on your page. Clear this check box to change shape placement options without affecting the connectors.
  • Align Shapes To Grid When Possible. Select this check box to lay out shapes and route connectors at regular intervals based on the settings in the Layout And Routing Spacing dialog box.
  • Enlarge Page To Fit Drawing. Select this check box to allow Visio to increase the page size if the optimal layout for your shapes requires more room.

InsideOut


If you're unclear about the effect a particular combination of placement and connector options may have on your diagram, you're not alone. Shape layout involves many variables, which makes it difficult to predict the exact outcome of the Lay Out Shapes command. Even people who have used Visio for years usually recommend an experimental approach to the Lay Out Shapes command—try an option, see what it does, and then press Ctrl+Z (Undo) if you don't like the results.

Customizing Shape Spacing and Connector Routing

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.

Adjusting Shape Spacing

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.

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


If your drawing contains shapes of various sizes, you might need to experiment with the average shape size. If your shapes vary significantly, using a smaller average shape size may yield better results.


Troubleshooting

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.


Adjusting the Connector Path Manually

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.

Figure 3-11.  To change the path of a connector, drag a vertex or midpoint.

Note


Some Visio connectors, such as the Line-Curve Connector, have a yellow control handle in the middle of a segment. The control handle provides another way to change the connector's path. On a Line-Curve Connector, the control handle adjusts the curvature of the line.

Displaying Line Jumps on Crossing Connectors

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.

Figure 3-12.  You can specify whether Visio displays a line jump where connectors cross.

Follow these steps to specify the line jump style:

  1. Do one of the following:
    • To specify the style for the entire diagram, choose File, Page Setup, and then click the Layout And Routing tab.
    • To change an individual connector, select the connector, and then choose Format, Behavior and click the Connector tab.
  2. Under Line Jumps, select an option from the Style list, and then click OK.


Microsoft Visio Version 2002 Inside Out
Microsoft Visio Version 2002 Inside Out (Inside Out (Microsoft))
ISBN: 0735612854
EAN: 2147483647
Year: 2000
Pages: 211
Authors: Nanette Eaton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net