Share via


The ShapeSheet Window

A Microsoft® Visio® object is stored internally as a set of formulas. For example, when you view a shape in a drawing window, you see it rendered graphically and see it behave according to its formulas. When you view the same shape in a ShapeSheet® window, you see the underlying formulas that determine how the shape looks and behaves on the drawing page. These two windows simply provide different views of the same shape.

In a drawing window, some of the changes you make to an object affect its formulas. For example, when you move a shape with the Pointer tool, Visio changes and then reevaluates the formulas that define the shape's center of rotation, or pin, on the drawing page, because those formulas determine the shape's location on the page. However, a ShapeSheet window gives you more precise control over the appearance and behavior of the object, because you can edit the object's formulas to change its behavior. Whether you change an object in a drawing window or a ShapeSheet window, the modifications are automatically saved when you save the Visio document that contains the object.

In this section…

Displaying a ShapeSheet Window

Displaying Sections in a ShapeSheet Window

ShapeSheet Sections and What They Control

Examining a Shape in a ShapeSheet Window

Displaying a ShapeSheet Window

Most Visio objects—shapes, groups, masters, guides and guide points, pages, documents, styles, and linked or embedded objects from other applications—have underlying formulas that you can edit to change the object's behavior. To edit an object's formulas, you must first display a ShapeSheet window for the object.

Parts of a shape in a ShapeSheet window

  1. When a ShapeSheet window is active, the menu bar contains commands for working with an object's formulas.
  1. You can edit the formula in the selected cell or in the formula bar.
  1. Each ShapeSheet section represents a set of related formulas.

To display a ShapeSheet window for an object on a drawing page

  1. Select the object on the drawing page.
  • To select a shape within a group (if its group behavior setting permits it), first select the group, and then select the shape. For more information about groups, see

  • Chapter 6, Grouping and Merging Shapes.

  1. On the Window menu, click Show ShapeSheet. Or click the Show ShapeSheet button Aa200960.ic_shpSheet(en-us,office.10).gif on the Developer toolbar.
  • To display the
  • Developer
  • toolbar, point to
  • Toolbars
  • on the
  • View
  • menu, and then click
  • Developer
  • .

Note To add the Show ShapeSheet command to shapes' shortcut (right-click) menus, click Options on the Tools menu, click the Advanced tab, and select Run in developer mode. This option also adds the Add-ons submenu to the Tools menu.

Drawing pages, styles, Visio documents, and masters in stencils also have formulas that you can edit.

To display a ShapeSheet window for a page, master, style, or document

  1. On the View menu, click Drawing Explorer Window.

The Drawing Explorer window

The Drawing Explorer window

  1. Click to open or close a folder.
  1. In the Drawing Explorer, right-click the document, page, or style you want, and then choose Show ShapeSheet from the shortcut menu.

Tip You can also display a ShapeSheet window for a page by clicking Show ShapeSheet on the Window menu with nothing selected on the page. Or, click the Show ShapeSheet button Aa200960.ic_Shpsheet(en-us,office.10).gif on the Developer toolbar.

To display a ShapeSheet window for a master in a stencil

  1. If the master is in a stand-alone stencil, on the File menu, point to Stencils, click Open Stencil, and then select the stencil file that contains the master you want. Make sure Original or Copy is selected in the Open Stencil dialog box (click the arrow next to the Open button, and then click Original or Copy).
  • If the master is in the document stencil of an open Visio document, on the
  • File
  • menu, point to
  • Stencils
  • , and then click
  • Document Stencil
  • .
  1. In the Visio stencil window, right-click the master and click Edit Master on its shortcut menu.
  • If the master is in the document stencil of an open Visio document, you can also display a master in its drawing window by right-clicking a master in the
  • Drawing Explorer
  • (under
  • Masters
  • ) and clicking
  • Edit Master
  • on its shortcut menu.
  1. In the master drawing window, select a shape, and then click Show ShapeSheet on the Window menu.
  • If
  • Run in developer mode
  • is selected on the
  • Advanced
  • tab in the
  • Options
  • dialog box (click
  • Options
  • on the
  • Tools
  • menu), you can also right-click a shape or page in the master drawing window and click
  • Show ShapeSheet
  • on the shortcut menu.

TOP

Displaying Sections in a ShapeSheet Window

A ShapeSheet window is divided into sections of labeled cells that contain formulas that define related aspects of object behavior and appearance. Initially, Visio does not display all possible sections in a ShapeSheet window. Some sections are hidden simply to save space on the screen; others are present for an object only if they are needed and make sense for that type of object.

For example, to create a command that appears on a shape's shortcut menu, you must add an Actions section to the shape, either by clicking the Section command on the Insert menu while a ShapeSheet window is open and active, or through Automation. (For details about adding sections through Automation, see Chapter 17, Automating Formulas.)

To show or hide sections in a ShapeSheet window

  1. Right-click in a ShapeSheet window, and then click View Sections on the shortcut menu.
  1. In the View Sections dialog box, select the sections you want to show, or clear the sections you want to hide, and then click OK.

To add sections using a ShapeSheet window

  1. Right-click in a ShapeSheet window, and then click Insert Sections on the shortcut menu.
  1. In the Insert Section dialog box, select the sections you want to add to the object, and then click OK.
  • Geometry sections are unlike other types of sections in that an object can have more than one Geometry section, whereas it can have only one of other types of sections. Select

  • Geometry

  • in the

  • Insert Section

  • dialog box to add an empty Geometry section that contains a MoveTo and LineTo row; select

  • Ellipse

  • or

  • Infinite Line

  • to add a Geometry section that contains a single Ellipse or InfiniteLine row, respectively. For details about Geometry rows, see

  • Chapter 5, Controlling Shape Geometry with Formulas.

Tip You can expand or collapse a section in a ShapeSheet window by clicking the section name.

TOP

ShapeSheet Sections and What They Control

Each ShapeSheet section controls some aspect of a Visio object. As a solution developer, you need to know which section or sections control the behavior you want to modify.

This topic lists all possible ShapeSheet sections with a brief description of what the section does. For details about specific cells in a ShapeSheet section, search the ShapeSheet Reference in the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference).

Note Many of the sections you see in the ShapeSheet window interface are actually referred to as rows when you manipulate them through Automation. For a list of the sections, rows, and cells that appear in the ShapeSheet® window, and for the corresponding index constants that you can use in a program to access sections, rows, and cells with Automation, see Appendix B, ShapeSheet Section, Row, and Cell Indices in this guide.

ShapeSheet sections

Section

Defines

1-D Endpoints

The x- and y-coordinates of the begin point and end point of a one-dimensional (1-D) shape.

Actions

Custom command names that appear on an object's shortcut menu and the actions that the commands perform.

Alignment

Alignment of an object with respect to the guides or guide points that the object may be glued to.

Character

Formatting attributes for an object's text, including font, color, transparency, text style, case, position relative to the baseline, and point size.

Connection Points

Connection points of an object.

Controls

x- and y-coordinates and behavior of an object's control handles.

Custom Properties

User-defined data associated with the object.

Document Properties

Document attributes, such as preview settings and output format.

Events

Formulas that evaluate when certain events occur, such as double-clicking a shape.

Note ShapeSheet events are unique to the ShapeSheet; they are not the same as Automation events.

Fill Format

Fill formatting attributes for an object and its drop shadow, including pattern, foreground color and transparency, and background color and transparency.

Foreign Image Info

Width, height, and offset within its borders of an object from another application in a Visio drawing.

Geometry

Coordinates of the vertices for the lines and arcs that make up an object's geometry. If the object has more than one path, it has a Geometry section for each path.

Glue Info

Formulas that influence how a 1-D shape glues to other objects.

Group Properties

Behavior, selection, and display attributes for groups, including selection mode, display mode, and text, snap, and drop behavior.

Hyperlinks

Links between an object and a destination, such as another drawing page, another file, or a Web site.

Image Properties

Bitmap attributes, such as image intensity (gamma), brightness, contrast, and transparency.

Layer Membership

Layers to which the object is assigned.

Layers

Layers of an object and the properties of each layer.

Line Format

Line formatting attributes, including pattern, weight, color, and transparency; whether the line ends are adorned (for example, with an arrowhead); the size of the adornments; the radius of the rounding circle applied to the line; and line cap style (round or square).

Miscellaneous

Properties that control various attributes, such as how the object looks when it is selected or dragged.

Page Layout

Page attributes that control automatic layout of shapes and routing of dynamic connectors, including default appearance and behavior of dynamic connectors and shapes.

Page Properties

Attributes such as drawing scale, page size, and offset of drop shadows.

Paragraph

Paragraph formatting attributes, including indents, line spacing, and horizontal alignment of paragraphs.

Protection

Status of locks set with the Protection command plus additional locks that can be set only in the ShapeSheet window.

Ruler & Grid

Settings of a page's rulers and grid, including density, origin, and spacing.

Scratch

A work area for intermediate formulas that are referred to by other cells.

Shape Layout

Placement and routing attributes, such as whether a connector can cross a shape or the style a connector should use when it jumps over another connector.

Shape Transform

General positioning information, such as width, height, angle, and center of rotation (pin); whether the object has been flipped; and how the object should behave when resized within a group.

Style Properties

Style attributes such as whether the style defines text, line, and fill formatting.

Tabs

Tab stop position and alignment.

Text Block Format

Alignment and margins of text in a text block. Also background color and transparency of the text block.

Text Fields

Custom formulas inserted in text using the Field command on the Insert menu.

Text Transform

Positioning information about a shape's text block.

User-Defined Cells

Named cells for entering formulas and constants that are referred to by other cells and add-on tools. Unlike Scratch cells, user-defined cells are portable—for example, if a shape that refers to a user-defined cell in the page sheet is copied to another page that does not have the same user-defined cell, the cell is added to the page. If the page already has such a user-defined cell, the shape simply refers to that cell for its value.

TOP

Examining a Shape in a ShapeSheet Window

A good way to learn about Visio formulas and the ShapeSheet window is to view a shape with a drawing window and a ShapeSheet window side by side. This is a useful technique for taking apart existing masters so you can see how their behavior is controlled by custom formulas. It's also helpful to try changing the default formulas for a master to see the effect on the shape in the drawing window.

To examine a shape in a ShapeSheet window

  1. Select the shape in the drawing window.
  1. On the Window menu, click Show ShapeSheet to display the shape's ShapeSheet window.
  1. On the Window menu, click Tile to arrange the ShapeSheet window and the drawing window side by side.

Examining a shape in a ShapeSheet window

Examining a shape in a ShapeSheet window

  1. Selecting certain rows or cells in a ShapeSheet window highlights the corresponding vertex in a drawing window.

To try this yourself, start by drawing a simple shape with straight line segments, such as a rectangle or other polygon, and display the ShapeSheet window as described in the previous procedure. In the ShapeSheet window, try any of the following suggestions and notice the effect on the shape in the drawing window.

  • Change the values of the PinX and PinY cells in the Shape Transform section. The shape should move on the drawing page.
  • Change the values of Width, Height, or Angle. The shape should shrink, grow, or rotate according to the new values.
  • Click the label of a row in a Geometry section to select the row. In the drawing window, a black handle appears on the corresponding vertex.
  • Select a row in a Geometry section. On the Edit menu, click Delete Row. The corresponding vertex is replaced by a straight line segment.
  • Select a row in a Geometry section. On the Insert menu, click Row or Row After. Try entering your own values in the cells of the inserted row. A new vertex appears on the shape with the coordinates you specify.

Tips If a ShapeSheet window displays values rather than formulas in cells, click Formulas on the View menu to display formulas instead.

To accept any change you make to a cell value, press the ENTER key.

You can display a section that is not visible, or you can hide a section you're not interested in. For details, see Displaying Sections in a ShapeSheet Window earlier in this section.

As you modify the shape, you might notice that some formulas are displayed in black text and others in blue. This indicates whether the formula is inherited or local, respectively. For details, see How Shapes Inherit Formulas later in this chapter.

In the drawing window, you can change the shape using the Visio drawing tools and commands to see the effect on the shape's formulas. Try any of the following suggestions:

  • Move the shape with the Pointer tool. The shape's PinX and PinY formulas change to reflect its new position on the drawing page.
  • Drag any selection handle to resize the shape. The shape's Width and Height formulas change to reflect its new size.
  • Use the Pencil tool to select a vertex and delete it, or add a vertex and move it. Notice the effect on the shape's Geometry section.
  • Change the shape's fill format or line format. The corresponding formulas in the shape's Fill Format or Line Format section change.
  • On the Format menu, click Protection and select various options in the dialog box. The corresponding cells in the shape's Protection section change from zero (0) to 1. In the ShapeSheet window, try changing various Protection cells from a non-zero number to 0 (or from TRUE to FALSE) and notice the effect on the shape's padlock handles in the drawing window.

For a brief discussion of the Visio drawing tools, see Chapter 2, Creating Visio Shapes. For details about the Shape Transform and Geometry sections, see Chapter 5, Controlling Shape Geometry with Formulas.

For reference information about any ShapeSheet section or cell and for information on how to work in the ShapeSheet, see the ShapeSheet Reference in the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference).