Microsoft Office Visio 2003 Inside Out (Inside Out (Microsoft))

Visio offers several aids to guide you in aligning shapes precisely. Many of these tools let you work quickly as Visio does the difficult work for you. Snapping shapes to other shapes or guides ensures proper positioning. The dynamic grid provides a cheat sheet—in effect, it suggests the best positions for shapes in relation to others already on the page. Shape extension lines show you where to draw with respect to shape geometry, tangent points, or isometric points on shapes.

Snapping Shapes for Automatic Alignment

Snapping is one of those Visio behaviors that you don’t often think about. It just works. You move a shape, and Visio seems to tug it into the correct position. Snapping works like magnetic attraction. It pulls a shape to a grid, guide, or another shape, making it easier to position and align shapes. For example, you can snap desk shapes to wall shapes, or snap valves to grid lines so that it’s easier to draw pipelines between them. Visio even tells you when you’re snapping to something, as Figure 16-15 shows.

Figure 16-15: When snap is enabled, Visio alerts you to opportunities to snap a shape to guides or other shapes.

Snapping can become very irritating, however, when you’re trying to draw precisely and the vertex keeps getting pulled in the wrong direction. At such times, you can quickly disable snapping, choose different snapping targets, or loosen the snap attraction. Snap strength is the stickiness of that attraction. Visio measures snap strength in pixels—the greater the number of pixels, the stronger the snap strength, because objects will attract other objects from farther away. Unfortunately, you can only specify one snap strength for all snap-to objects.

Tip

Disabaling snapping for categories of shapes In diagrams with many shapes, such as a building plan, you can disable snapping for entire categories of shapes by assigning them to a layer. Layers in Visio are abstract, but definitely worth the effort. For details, see “Controlling Shapes with Layers,” page 460.

It’s easy to use the Snap & Glue toolbar if you want to quickly change snap settings, as Figure 16-16 shows. If it’s not visible, choose View, Toolbars, Snap & Glue. For example, to quickly toggle snapping on and off, click the Snap button on the Snap & Glue toolbar.

Figure 16-16: The Snap & Glue toolbar helps you change snap settings quickly.

For aligning shapes, the most useful options are to snap to ruler subdivisions, grids, and guides. Snapping to shapes is useful when you want to position a shape at an exact point on another shape without knowing the point’s coordinates. For example, you can snap a line to a quadrant on a circle. Snapping to geometric points is similar to using object snaps in CAD software. Table 16-3 lists the objects you can snap to when you use the Snap & Glue command.

Table 16-3: Objects That Shapes Can Snap To

Object

Description

Ruler subdivisions

The tick marks on the ruler.

Grid

The grid, which appears as nonprinting lines on the page.

Alignment box

The dotted green box that appears around a shape when you move it.

Shape extensions

Any of the lines selected on the Advanced tab of the Snap & Glue dialog box that are used to show alignment. For details, see “Drawing Accurate Geometry with Shape Extension Lines,” page 651.

Shape geometry

The visible edges of the shape. This option is more useful for gluing than for snapping alone.

Guides

Ruler guides and guide points. For details, see “Aligning and Moving Shapes with Guides,” page 443.

Shape intersections

The point where two shapes intersect, where shape extensions and shapes intersect, or where shape edges are perpendicular to the grid.

Shape handles

The green selection handles that appear when you select a shape with the pointer.

Shape vertices

The green diamonds that show line segments when you select a shape with the Pencil tool. For details, see “Understanding Shape Geometry,” page 637.

Connection points

The blue Xs to which connectors can be glued. For details, see “Adding Connection Points to Shapes,” page 77.

Follow these steps to choose the objects that shapes snap to:

  1. Choose Tools, Snap & Glue.

  2. Under Currently Active, make sure Snap is selected.

  3. In the Snap To list, select the objects you want to snap to.

  4. If you want to adjust snap strength, click the Advanced tab, and then use the sliders to adjust snap strength for the rulers, grid, guides, and points (connection points, vertices, and shape handles).

  5. Click OK.

    Changes you make in the Snap & Glue dialog box will not affect objects you’ve already placed, so you can change these settings as you work on different kinds of shapes.

    Tip

    Snap and glue often work hand in hand to help pull shapes into position and then keep them there. For details about glue, see “Controlling Connections with Glue,” page 80.

Using the Dynamic Grid to Center Shapes

If you want to quickly center shapes with respect to other shapes on the drawing page, the dynamic grid makes your task easier. Don’t confuse the dynamic grid with those nonprinting lines you see on the drawing page. Instead of measuring space on the page, the dynamic grid shows you the most desirable location for the center of a shape, based on where you’ve placed previous shapes. For example, if you have one shape on the page and the dynamic grid is activated, when you drag a new shape near the first, dotted lines show the center point of the first shape, as Figure 16-17 shows.

Figure 16-17: When you drag a shape onto the dynamic grid, dotted lines show you where to drop it to align it with the shapes near it.

To turn on the dynamic grid, choose Tools, Snap & Glue, and then click the General tab. Under Currently Active, select Dynamic Grid, and then click OK.

Tip

To quickly enable and disable the Dynamic Grid, make sure the Snap & Glue toolbar is displayed (choose View, Toolbars), and then click the Snap To Dynamic Grid button.

Entering Coordinates for Shape Position

You can enter coordinates to move a shape to a specific point on the page with the Size & Position window. To display this window, choose View, Size & Position Window. When you select the shape, its dimensions and location are displayed in the Size & Position window. Depending on the type of shape, different fields can appear. The position of a 1-D shape is described in terms of the position of the line’s begin and end points. A 2-D shape’s position is described in terms of the shape’s pin, or center of rotation.

You can think of the horizontal ruler on the drawing page as the x-axis and the vertical ruler as the y-axis of Visio’s coordinate plane. The horizontal position of a shape on the drawing page is its x-coordinate. A shape’s vertical position is its y-coordinate. Together, these values are referred to as the page coordinates of the shape’s position—that is, the shape’s position relative to the page’s axes. That position is measured in the drawing scale established for the page, which you see as the ruler’s units.

A 2-D shape’s position is given by the x- and y-coordinates of its pin, which marks its center of rotation. If you select a shape with the Rotation tool, its pin is the green circle in the middle. By the way, a shape doesn’t have to rotate around its center. You can drag the pin with the Rotation tool to put it wherever you want. However, the Size & Position window always records the shape’s position as its pin’s position in the X and Y boxes, as Figure 16-18 shows.

Figure 16-18: The position of a 2-D shape’s pin, or center of rotation, appears in the X and Y boxes in the units of measure defined for the drawing page.

The Pin Pos box tells you where the pin is with respect to the shape’s alignment box, the rectangle that appears around shapes when you move them. The pin position is displayed as the vertical and horizontal position. For example, Center-Center means the pin is centered vertically and horizontally with respect to the shape’s alignment box. When you choose an option in the Pin Pos box, such as Top-Left or Bottom-Right, the shape moves so that the pin is located in the selected position.

Tip

If you have Visio Professional, you can also use the Move Shape add-in to move shapes. It provides a few more options than the Size & Position window. For details, see “Moving Shapes with the Move Shapes Add-In,” page 441.

Displaying 1-D Shapes in the Size & Position Window

For 1-D shapes, the Size & Position window displays the x- and y-coordinates of the begin point and the endpoint for a total of four values, as Figure 16-19 shows. The begin point is the line’s origin and is indicated by an X in the selection handle. The endpoint is marked with a plus (+) sign in the selection handle.

Figure 16-19: The position of this 1-D wall shape is displayed as two sets of coordinate points that locate the shape’s begin point and endpoint.

Entering Values to Move Shapes

When you type new coordinates for a shape’s position in the Size & Position window, the new values take effect as soon as you press the Enter key. Table 16-4 describes the effect of changing the x- and y-coordinates for 2-D and 1-D shapes.

Table 16-4: Options for Moving Shapes with the Size & Position Window

Size & Position Field

Effect of Entering a New Value

X

Changes the horizontal position of a 2-D shape as measured from its pin

Y

Changes the vertical position of a 2-D shape as measured from its pin

Begin X

Changes the horizontal position of a 1-D shape’s begin point

Begin Y

Changes the vertical position of a 1-D shape’s begin point

End X

Changes the horizontal position of a 1-D shape’s endpoint

End Y

Changes the vertical position of a 1-D shape’s endpoint

Moving Shapes with the Move Shapes Add-In

In addition to the Size & Position window, Visio Professional includes a different tool for moving shapes: the Move Shapes add-in, shown in Figure 16-20. (Visio Standard does not include this tool.) Its main advantage over the Size & Position window is that you can specify the distance as a function of the shape’s current position, rather than using page coordinates (the X and Y boxes). In addition, you can move a copy of a shape rather than the original, and you can specify the distance to move in polar coordinates, which moves a shape along an angle.

Figure 16-20: You can move shapes by specifying linear or polar coordinates with the Move Shapes add-in.

Follow these steps to use the Move Shapes add-in to move a shape:

  1. Select a shape, and then choose Tools, Add-Ons, Visio Extras, Move Shapes.

  2. To specify the new position using polar coordinates, select the Distance/Angle option, and then specify the following:

    • In the Distance box, type the radial distance you want to move the shape.

    • In the Angle box, type a number for the angle along which you want to move the shape.

    Angles are measured positively in a counterclockwise direction with respect to the shape’s alignment box. For example, to move the shape up the page, type 90 degrees; to move it to the left, type 180 degrees; and to move it straight down, type 270 degrees.

  3. To specify the new position using linear coordinates, select Horizontal/Vertical, and enter the horizontal and vertical distances you want the shape to move.

  4. To check the settings you’ve entered in the Move Shapes dialog box, click Apply, and then see where the shape moves.

    After you click OK, the next time you open the Move Shapes dialog box, the values are reset, so you won’t have a record of the settings you used, which might be a problem if the shape moved in an unexpected direction.

  5. Click OK. If the shape didn’t move as expected, press Ctrl+Z to undo the results.

Inside OutLocal coordinates

In Visio terms, the Move Shapes add-in moves a shape with respect to the shape’s local coordinates, which are just the shape’s width and height irrespective of its position on the page. For example, if you rotate a shape, its local x-axis (its width) is no longer parallel to the x-axis on the page. You can’t do this in the Size & Position window.

Категории