Using Shape Data Sets

You can edit the data for any individual shape, or you can take advantage of Visio’s shape data set. This feature provides a quick way to define and work with a group of shape data, and then apply them wholesale to a group of shapes. To create a shape data set, you define a name for the set and then add the data you want to include. Then you can apply your property set to selected shapes on the drawing page, the document stencil, or any open custom stencil. When you create shape data in this way, it’s easy to edit labels and formats for the entire set.

Shape data sets become especially useful when you import objects to use as shapes or draw shapes from scratch. The imported and from-scratch shapes won’t have the same shape data as other shapes in the drawing. For example, in a floor plan, shapes can be used to track facilities and equipment information through their shape data. If you convert a CAD symbol library to Visio 2007 shapes, the converted shapes don’t have shape data. However, you can quickly add the entire set of facilities and equipment properties to the converted shapes.

You can apply only one shape data set to a shape or custom stencil master shape. When you apply a shape data set to a shape that already has a set, Visio 2007 applies the new property set and removes the previous one. If you apply a shape data set to a shape that has shape data, but not a shape data set, the original properties are retained and the new set of data is added.

Defining a Set of Shape Data

To define a shape data set or edit its definition, you use the Shape Data Sets window, which lets you do the following:

  • Create a new shape data set for a document

  • Rename an existing shape data set

  • Delete an entire shape data set or a property within a set

  • Add new shape data to an existing set

  • Use existing shape data in a shape to create a set

The definition of a shape data set includes the names of the set as well as names (labels) for the shape data in the set and the data type, format, value, and prompt, as Figure 6-11 shows. A shape data set is saved with a document. If you open a custom stencil file and create a shape data set, the set is saved with the stencil, and you can then apply it to master shapes on the stencil. If you define a shape data set in a drawing, you can apply the set to shapes on the drawing page or master shapes on the drawing’s document stencil.

Figure 6-11. With the Shape Data Sets window you can create a new shape data set and define its properties, as well as add and remove individual shape data.


You can also change the definition of an existing shape data set to rename or delete a set, or work with individual shape data in a set. For example, you can edit property labels so that the labels you want appear in the Shape Data window, or you can add and remove individual shape data that is included in a set.

Note

If you’re creating a drawing based on a Process Flow Diagram (included only with Visio Professional 2007), you can define shape data sets in the Component Model Properties dialog box.


Defining a New Set Based on Existing Shape Data

An easy way to create a shape data set is to copy the shape data defined for an existing shape, and then create a set from that data. You can also copy the shape data that are included in an existing set to create a new shape data set and revise its definition as you want. When you copy shape data, you avoid starting from scratch and can take advantage of existing definitions. For example, if you’re working with Visio 2007 shapes that include a shape data set, you can create a new set based on the existing one and then revise the property labels so that the names you want appear in the Shape Data window. That way, you don’t alter the original shapes or their definitions, but you can customize labels at will.

To create a new shape data set based on a shape with properties, follow these steps:

1.
Select a shape for which shape data have already been defined—either a shape on the drawing page or a master shape from a custom stencil you’ve opened for editing.

2.
Right-click in the Shape Data window and choose Shape Data Sets.

3.
Click Add.

4.
In the Add Shape Data Set dialog box, the option Create A New Set From The Shape Selected In Visio is already selected.

5.
In the Name box, type a name for the shape data set as you want it to appear in the Apply Shape Data Set dialog box.

6.
Click OK.

In the Shape Data Sets window, the new set is listed.

7.
You can close the Shape Data Sets window.

A new shape data set is created and stored with the document. To apply the set to other shapes, see the sections that follow.

To create a new shape data set based on the definition of an existing set, follow these steps:

1.
Right-click in the Shape Data window and choose Shape Data Sets.

2.
In the Shape Data Sets window, click Add.

3.
In the Name box, type a name for the new set.

4.
Select Create A New Set From An Existing Set.

5.
In the Shape Data Sets window, select the shape data set that you want to copy, and then click OK.

Visio 2007 adds the new shape data set and its property definitions to the active document.

6.
Click the set and then choose Define to edit the shape data you copied from the existing set, or choose whether to apply the set to selected shapes in the drawing or stencil, and then click Apply.

Defining a New Set and Its Properties

You can create a shape data set from scratch and define the shape data that you want to include in the set. If you’re working with stencils and documents that do not contain shape data, such as a new stencil that you’ve created, this is the best way to add shape data. You create a set, define each property in the set, and then apply the set to your shapes as described later in this chapter.

To create a new shape data set and define its properties, follow these steps:

1.
Open the document in which you want to save the shape data set.

You can open either a drawing or custom stencil file. If you plan to apply the set to master shapes, open the custom stencil for editing (right-click its title bar, and then click Edit Stencil).

2.
Make sure no shapes are selected. Right-click in the Shape Data window and choose Shape Data Sets.

3.
Click Add.

4.
In the Name box, type a name for the shape data set.

5.
Click OK.

The new set is listed in the Shape Data Sets window. In the Shape Data window, no properties are listed.

6.
Click Define.

The Define Shape Data dialog box appears and lists Property1 as the default, initial shape data.

7.
Define the new data by typing or selecting the values you want for Label, Type, Format, Value, and Prompt.

For details about these options, see Table 6-2. If you’re not certain which Type option to select, select String.

8.
When you’ve defined the data, do one of the following:

  • Click New to define more shape data for the set.

  • Click OK to close the Define Shape Data dialog box.

9.
Close the Shape Data Sets window.

A new shape data set is created and stored with the document. To apply the set to other shapes, see the sections that follow.

Editing Shape Data Sets

You can edit the definition of a shape data set. Specifically, you can change the name of the set itself and you can edit the shape data in the set. When you revise an existing set, the changes are saved in the active document, which can be a drawing or custom stencil file. If you apply the set to a master shape of a custom stencil, all instances of the document’s shapes are updated. To edit a shape data set, follow these steps:

1.
Right-click in the Shape Data window and choose Shape Data Sets.

2.
In the Shape Data Sets window, select the set you want to edit.

3.
If you want to rename the set, click Rename, type a new name in the Name box, and then click OK.

4.
If you want to edit, add, or remove custom properties in the set, click Define.

The Define Shape Data dialog box appears and lists the definition for the first shape data, which is selected in the Properties list at the bottom of the dialog box.

Note

Any changes you make are immediately applied to the selected shape data.

5.
In the Properties pane, select the shape data, and then revise the definition by typing or selecting the values you want in the Label, Type, Format, Value, and Prompt boxes. For details about these options, see Table 6-2.

6.
When you’ve defined the property, do one of the following:

  • Select a new property to edit in the Properties pane.

  • Click New to define new shape data.

  • Click OK to close the Define Shape Data dialog box.

Visio 2007 adds the properties to the shape, which you can see in the Shape Data window.

Applying a Shape Data Set to Shapes

You can assign a shape data set to specified shapes in a drawing. It’s probably more often the case that you’d apply shape data sets to master shapes, but sometimes you just need to update shapes on the drawing page. For example, if you use the drawing tools to create new shapes in a diagram, you can apply the shape data set used by other shapes to the new shapes. Right-click in the Shape Data window and choose Shape Data Sets to list all the shape data sets defined for the active document—that is, your drawing file. You choose the shape data set you want, select whether you want to apply the shape data set to the shapes selected in the drawing or the shapes selected in the stencil, and click Apply. Visio 2007 then adds the set of data to the selected shape.

Before you can apply shape data sets, you need to make sure that your document contains shape data sets. If the active document does not include a set, you’ll see <Sample, Description, ID> listed in the Shape Data Sets window. You can use the Shape Data Sets window to define a new shape data set and then apply it using the procedure that follows.

Note

In previous versions of Visio only one set of shape data could be applied to a shape. Now, however, you can add a shape data set to a shape, in addition to previous properties, such as fill, etc. If you wish to replace the existing data set, select Remove Existing Data Sets in the Shape Data Sets window.


To add a shape data set to selected shapes, follow these steps:

1.
Select a shape or set of shapes in a drawing, and then right-click in the Shape Data window and choose Shape Data Sets.

2.
In the Shape Data Sets window, select the name of the set you want.

3.
Make sure that the Shapes Selected In Drawing option is selected.

If this option is unavailable, no shapes are selected on the page. Click the shape to which you wish to apply the property set.

4.
Click Apply to add the set of custom properties to the selected shapes.

Troubleshooting: After editing property names in a set, the changes do not appear in the Shape Data window for selected shapes

When you use the Edit Shape Data Set command, you can make changes to an existing set of data, but Visio 2007 does not apply those changes to existing shapes, even if they are assigned to the set you edited. You must use the Apply Shape Data Set command to update the shapes with the edited set.


Applying Shape Data Sets to Master Shapes on a Custom Stencil

If you’ve created your own shapes or want to revise Visio 2007 master shapes to use a particular set of shape data, you can apply a shape data set to all or selected master shapes on a custom stencil. You can use the Shape Data Sets command to add sets of data to the master shapes you select in an open custom stencil file. The stencil file can be any of the following:

  • A Visio 2007 custom stencil that you’ve opened for editing (right-click the title bar, and then choose Edit). You can save your changes as a new stencil file so that you retain the original stencil. You might need it if your changes to the shapes’ properties have unexpected consequences.

  • A stencil that you’ve created (choose File, Shapes, My Shapes, and then open your .vss file).

  • The document stencil for your drawing (choose File, Shapes, Document Stencil). All the shapes in your drawing will be updated with the changes made to the master shapes on the document stencil.

To add a shape data set to selected master shapes, follow these steps.

1.
Do one of the following to open a stencil containing the master shapes you want:

  • To apply the set to an existing custom stencil file, open the stencil, right-click its title bar, and then select Edit.

  • To apply the set to the drawing’s document stencil, choose File, Shapes, Document Stencil.

2.
Right-click in the Shape Data window and choose Shape Data Sets.

In the Shape Data Sets window, select the Shapes Selected In Stencil option.

3.
Select the shapes you wish to apply the property set to on the document stencil.

4.
In the Shape Data Sets window, click Apply.

Visio 2007 applies the shape data set to the selected master shapes. Depending on the number of shapes you select, you might see a progress indicator as Visio 2007 applies the set to all the shapes. The next time you drag a master shape from the stencil, the shape on the page will include the set of shape data.

Deleting Shape Data

You can delete shape data from shapes and master shapes on a custom stencil. You can also delete shape data sets, although all you delete is the definition for the set. If you apply a shape data set to shapes and then delete the set, the shapes retain their shape data. However, the document no longer knows that the data came from a set.

To delete a shape data set, follow these steps:

1.
In a document that contains shape data sets, right-click in the Shape Data window and choose Shape Data Sets.

2.
In the Shape Data Sets window, select the set you want to delete, and then click Delete.

3.
Click Apply.

Visio 2007 removes the shape data set from the active document. Shapes that include shape data from the deleted set are not changed—they retain their shape data.

It’s wise not to delete built-in shape data that come with many of the Visio 2007 shapes. These properties might be required by the solution to accommodate the shape’s “smart” behavior. For example, organization chart shapes include a number of invisible shape data that don’t appear in the Shape Data window, but might appear in the Define Shape Data dialog box, which means that you can delete them. However, the organization chart engine uses these properties to track document and layout options, so you do not want to delete them.

To delete shape data from a shape or master shape, follow these steps:

1.
Select a shape on the drawing page, a master shape on the document stencil, or a master shape on a Visio 2007 custom stencil.

Note

To open a master shape for editing so that you can select it, right-click a custom stencil’s title bar, and then choose Edit Stencil. On the stencil, double-click a master shape to open it in a drawing window. If necessary, select the master shape.

2.
If the Shape Data window is not open, select View, Shape Data Window.

3.
Right-click in the Shape Data window, and then select Define Properties.

4.
In the Properties pane, select the property you want to delete, and then click Delete.

Visio 2007 deletes the shape data from the selected shape. You don’t get a warning first, but you can undo the operation after you’ve closed the dialog boxes.

5.
Click OK.

Note

To restore the deleted property, press Ctrl+Z or choose Edit, Undo.

6.
If you edited a master shape, click the Close Window icon in the master drawing window. Make sure to click the correct button. Don’t click the Visio window’s Close icon.

Visio 2007 displays a message asking whether you want to update the master.

7.
Click Yes.

If you edited a document stencil, all the shapes in the drawing that are based on the master shape you edited will no longer include the deleted shape data.

8.
To save your changes to the stencil, do one of the following:

  • If you edited a Visio 2007 custom stencil, right-click the title bar, choose Save As, and then specify a file name and location for the stencil.

  • If you edited a document stencil, choose File, Save to save the changes with the drawing file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset