Finishing and Testing a Stencil

After you have created a stencil containing your masters, a few tasks remain to prepare your stencil for distribution. For example, the stencils you create will be easier to use if the masters look as if they belong together and each conveys the corresponding shape's purpose.

In this section…

Creating Master Shortcuts

Cleaning up Masters in a Stencil

Cleaning up a Stencil File

Testing Stencils

Creating Master Shortcuts

You can create shortcuts to masters in the same stencil or in other stencils. To create master shortcuts, the masters must be in a stencil that has been saved. These shortcuts look and behave exactly like a master, but they are references to a master that can reside on any stencil. Master shortcuts contain no shape data—only a reference to the original master. When the shortcut is dragged onto the drawing page, the original master is retrieved and used to create the new shape.

By creating master shortcuts in your stencil, you can:

  • Reduce the size of your stencils by referencing, rather than duplicating, masters.
  • Simplify maintenance of your masters by keeping the shape data in a single location.
  • Provide multiple shortcuts to a single master and define actions for each shortcut (called Drop actions) that affect the appearance of the shape when it is dropped onto the page.

To create a master shortcut, do one of the following

  • Right-click the master, and then click Create Shortcut on the shortcut menu. The shortcut appears in the same stencil as the master; you can then drag the shortcut to another stencil. A stencil must be editable to create a master shortcut on the same stencil as the master.
  • Right-click the master, and then click Copy. Right-click the stencil where you want to place the shortcut, and then click Paste Shortcut. The shortcut appears in the same stencil as the master.
  • Drag the master to another stencil while holding down CTRL+SHIFT. Instead of creating a copy of the master in the destination stencil, Microsoft® Visio® creates a shortcut to that master.

To define actions that occur when a master shortcut instance is dropped on the page

  1. Make sure the stencil with the master shortcut is editable by opening the stencil as Original, or by clicking the icon in the stencil title bar and clicking Edit.
  1. Right-click the master shortcut, and then click Master Shortcut Properties.
  1. In the Drop actions box in the Master Shortcut Properties dialog box, enter any cell names set equal to a valid formula or value that you want to apply to the instance of the master. For example, to apply a red fill color to a shape when it is dropped on the drawing page, enter the following:

FillForegnd = 2

FillForegnd = 2 + 3; LockFormat = 1

TOP

Cleaning up Masters in a Stencil

You can edit the master name and icon to make your masters easier for users to identify. You can also add a prompt that appears as a tool tip when a user pauses the pointer over the master in the stencil window and explains the master's purpose.

By default, a master's name is the identifier that Microsoft Visio assigns, and its icon is a miniature version of the master. When you edit a new master, the icon is updated to reflect the shape you draw unless you specify otherwise.

To help users identify your master, you can design a custom image for its icon.

To help users identify your master, you can design a custom image for its icon.

  1. Window master icon
  1. Window shape as it appears in the drawing window

To specify a master name and prompt

  1. Open the stencil as Original. Or click the icon on the stencil's title bar, and then click Edit.
  1. In the stencil window, right-click a master, and then click Master Properties on the shortcut menu.
  1. In the Name box, type a name for the master. If you want to align the master name under the icon in some fashion other than centered, click an Align master name option.
  1. In the Prompt box, type the text you want to appear in the tool tip when the user points to the icon.
  1. For Icon size, select the size that you want.

To create a custom master icon

  1. In the stencil window, right-click a master, and then click Edit Icon on the shortcut menu.
  1. Use the drawing tools in the icon editing window to edit the icon or create a new design.
  1. When you are finished, close the icon editing window.
  1. To protect your custom icon, right-click the master, and then click Master Properties. Verify that the Generate icon automatically from shape data check box is cleared.

The icon editing window

The icon editing window and tools

  1. Editing tools
  1. Click the left or right mouse button to apply the current color, or to choose another color from the color palette.
  1. Icon editing window

TOP

Cleaning up a Stencil File

Before you save a finished stencil, you should do the following cleanup tasks to enhance performance:

  • Arrange the icons in the stencil windows to ensure that they appear on the screen in order from left to right, top to bottom, when the file is opened.
  • Include file summary information for the stencil. To do so, make the stencil window active, and then click Properties on the File menu.
  • To save file space, make sure your stencil file contains only the required single drawing page and that there are no shapes on it.
  • Delete any styles from the drawing page that are not used by the masters in the stencil. A stencil file should contain only masters and their styles.
  • Verify that the style definitions in a stencil match those for styles of the same name in any templates that open the stencil. For details about working with styles, see Chapter 10, Managing Styles, Formats, and Colors.
  • Use the Save As command to save your stencil file. In the Save As dialog box, click the arrow next to the Save button and make sure that Workspace is not selected. A stencil's workspace list should be empty.

TOP

Testing Stencils

You test stencils by reviewing the Open dialog box information and opening the stencil as Original, Copy, and Read only.

Tip To protect your original stencil, create a copy that contains the shapes you want to test and use the copy for testing. After you test, incorporate changes in the original stencil and make a new copy for additional testing.

To test the stencil in the Open dialog box

  1. On the File menu, point to Stencils, and then click Open Stencil.
  1. For File Name, select a stencil file.
  1. Verify the following:
  • The default setting is Read only (under the Open button).
  • When you pause the mouse pointer over the name of a stencil in the file list, a tool tip appears with a title and description of the stencil.

To test the original version of a stencil

  1. Open the stencil file as Original.
  1. Verify the following:
  • The file opens with its name displayed correctly in the title bar. For example, the name should look like this: Basic Shapes.vss. (If the stencil is open in a docked, anchored window you will not see the .vss extension.)
  • The stencil window occupies the left quarter of the screen.
  • Property information for the stencil is provided. To check, click the icon on the stencil's title bar, and then click Properties on the shortcut menu. Verify that the spelling, grammar, content, spacing, capitalization, and punctuation for the text in the various boxes on the Summary tab are correct for the stencil.

To test a copy of a stencil

  1. Open a stencil file as Copy.
  1. Verify the following:
  • The file opens with a generic name, such as Stencil1.
  • File property information is blank except for the Author box; the Author box displays the user name specified in the Options dialog box (Tools menu) or when Visio was installed on the computer.

To test the read-only version of a stencil

  1. Close all other files (including drawing files) and open the stencil file as Read only.
  1. Verify the following:
  • The file name in the title bar appears in braces.
  • On the File menu, the Save command is dimmed.
  • On the Edit menu, the Cut, Clear, and Duplicate commands are dimmed.
  • On the Master menu, all commands are dimmed.