-->![Military Military](http://31.media.tumblr.com/tumblr_koc9tfmmGh1qz7itlo1_r3_500.png)
Note
Linking shapes to data relies on the fact that you can assign shape data to all Visio shapes. In versions of Visio earlier than Visio 2007, shape data were called custom properties. To access and assign shape data in the Visio UI, right-click a shape, point to Data, and then click Shape Data. Alternatively, you can access and assign shape data.
Data-connectivity features are available only to licensed users of Microsoft Visio Professional 2013.
There are four aspects of data connectivity in Visio:
- Connecting to a data source
- Linking shapes to data
- Displaying linked data graphically
- Refreshing linked data that has changed in the data source, updating linked shapes, and resolving any subsequent conflicts that may arise
Typically, you approach these aspects in the order in which they are listed; that is, you first connect your Visio drawing to a data source, then link shapes in your drawing to data in the data source, display the data in linked shapes graphically, and refresh the linked data when necessary.
Each of these aspects has objects and members associated with it in the Visio object model. This topic deals with the second of these aspects, linking shapes in your Visio drawing to data. For more information about the other aspects of data connectivity, see the following topics:
To connect your Visio drawing to a data source programmatically, you can use the Visio API for data connectivity, which includes the following objects and their associated members:
- DataRecordsets collection
- DataRecordset object
- DataConnection object
- DataRecordsetChangedEvent object
- DataColumns collection
- DataColumn object
After you connect your Visio drawing to an external data source, you can link the shapes in the drawing to data from that source programmatically. You can link one or more shapes to a single row of data in a data recordset or to multiple rows of data in different data recordsets. However, you cannot link shapes to multiple rows of data in the same recordset.
You can link existing shapes to data, one shape at a time or as a group; or, you can create shapes and link them to data simultaneously. You can specify the correspondence between shapes and data rows, if you know it, or you can let Visio determine the correspondence automatically, based on a comparison between existing shape data and data in the data recordset.
After you link shapes to data, you can display that data graphically by adding data graphics to shapes. For more information about data graphics, see About Displaying Data Graphically.
![Military Military](http://31.media.tumblr.com/tumblr_koc9tfmmGh1qz7itlo1_r3_500.png)
The DataRecordset and DataColumn objects and the DataColumns collection expose several properties, methods, and events that facilitate data linking. In addition, several members of other objects in the Visio object model, including the Application, Document, Page, Selection, Shape, and Window objects, are related to or 'custom properties' in their name. If you do not assign shape data for a given shape, no Shape Data section appears in the ShapeSheet. You can add a Shape Data section to a ShapeSheet by displaying the ShapeSheet as described previously, right-clicking anywhere in the ShapeSheet window and clicking Insert Section, selecting Shape Data, and then clicking OK.
After you link shapes to data, many of the columns of the Shape Data section correspond closely to the properties of the DataColumn object. For example, the Label column in the Shape Data section, which provides the label that appears for a particular shape data item in the Shape Data dialog box, corresponds to the DataColumn.DisplayName property, which controls the name that appears for the associated data column in the External Data window. For more information about working with the DataColumn object, see Getting and setting in About Connecting to Data in Visio.
Creating shapes linked to data
When you want to create shapes, already linked to data, on a drawing page that either does not contain any shapes or contains shapes other than the ones you want to link, you can use the Page.DropLinked and Page.DropManyLinkedU methods to create one or more additional shapes already linked to data. These methods resemble the Page.Drop and Page.DropManyU methods in that they create additional shapes at a specified location on the page; but in addition, they create links between the new shapes and specified data rows in a specified data recordset.
The DropLinked method returns the new, linked Shape object and takes the following parameters:
- ObjectToDrop - The particular shape (a Rectangle shape, for example) you want to create.
- x - The x-coordinate of the center of the new shape on the page.
- y - The y-coordinate of the center of the new shape on the page.
- DataRecordsetID - The value of the ID property of the DataRecordset object that contains the data row to link to.
- DataRowID - The value of the ID property of the data row to link to.
- ApplyDataGraphicAfterLink A Boolean value specifying whether to apply the shape's data graphic automatically if it already has one, or if not, whether to apply the most recently used data graphic. The default is not to apply a data graphic. For more information on data graphics, see About Displaying Data Graphically.
The following sample code shows how to use the DropLinked method to create a shape on the active drawing page, centered at page coordinates (2, 2), and linked to a data row. It takes the DataRecordset object passed in, gets its ID, and then passes that ID, along with ID of the data row to link to, to the DropLinked method. The dropped shape is a simple rectangle from the Basic_U.VSS stencil, which the code opens, docked in the Visio drawing window.
In this example, the ID of the data row is set to 1; before running the code, ensure that a row with that ID exists, or change the ID value in the code.
The DropManyLinkedU method similarly creates a set of linked shapes, returned as an array of shape IDs. It takes as parameters arrays of shapes to drop, coordinates, and data rows to link to. Entries at corresponding array-index positions determine how shapes and data rows are related and where on the page individual shapes are dropped.
Linking existing shapes to data
When you know exactly how one or more existing shapes in a Visio drawing and one or more rows in a data recordset correspond to one another, you can link the existing shapes to data in the following ways:
- Link a single shape to a single data row
- Link a selection of shapes to one or more data rows
- Link multiple shapes to multiple data rows
In addition, if you do not know the exact shape to data mapping, you can direct Visio to make the best match possible, based on limited matching information that you provide.
Linking a single shape to a data row
To link a single shape to a single data row, use the Shape.LinkToData method. This method takes a data recordset ID and data row ID as well as an optional Boolean flag specifying whether to display the linked data in a data graphic. The default is to display the data graphic.
Linking multiple shapes to data
Two members of the Selection object, the Selection.LinkToData and Selection.AutomaticLink methods, as well as the Page.LinkShapesToDataRows method, make it possible to link one or more existing shapes in a selection to data.
The Selection.LinkToData method functions much like the same method of the Shape object, except that it links a selection of shapes, instead of a single shape, to a single data row.
If you are unsure about the correspondence between shapes and data rows, but know a match exists between a specific attribute of every shape and the data in one column in the data recordset, the Selection.AutomaticLink method provides a means to link a selection of existing shapes to multiple rows of data. Note that it must be the same attribute for all shapes. For more information about this method, see Linking to Data Automatically.
The Page.LinkShapesToDataRows method is similar to the Selection.LinkToData method in that it links multiple shapes. However, you use this method to link shapes on the same page, rather than shapes in a selection, to data. The LinkShapesToDataRows method links shapes to multiple data rows, whereas the LinkToData method links multiple shapes to a single row. To link shapes, pass the LinkShapesToDataRows method a pair of arrays: one for shapes, and one for data rows. Note that the matching array positions must correspond. As a result, for example, the shape at position 1 in the shape array is linked to the data at position 1 in the data row array. Once again, when you call the method, you can optionally specify whether to apply an existing data graphic to linked shapes.
Linking to data automatically
You can use the Selection.AutomaticLink method to link shape data values in selected shapes—that is, shapes assigned to a Selection object—to data rows in a data recordset automatically—that is, without specifying the exact correspondence of all shapes and data rows. To provide Visio with enough information to create the links, however, you must supply at least one set of matching data: the name of a column in the database, a shape attribute type, and, if necessary, a shape value, all at the same index position of the corresponding arrays you pass to the method.
The shape attribute type indicates the attribute of the shape to base the matching upon. The attribute can be the value of a shape data item (formerly known as a custom property value), shape text, or another of the values specified in the VisAutoLinkFieldTypes enumeration.
Note
For example, say that your drawing contains a selection of shapes representing different employees. Their shape text identifies the shapes, which in this case would be the respective employee's names. (You could use some of the employee names from the OrgData.xls workbook that ships with Visio, and then connect to that data source. By default, OrgData.xls is installed at the following path: C:Program FilesMicrosoft OfficeOffice15Visio Content[ langID], where langID varies by country or region.) On some computers, the path might include 'Program Files (x86)' instead of 'Program Files.'
To connect these shapes to a database where each employee's data constitutes a row in the database, you pass the following parameters to the AutomaticLink method:
- DataRecordsetID The value of the ID property of the DataRecordset object that contains the data rows to link to. In the example that follows, we pass an existing data recordset to the procedure and get its ID.
- ColumnNames() A string array consisting of names of columns in the database. At least one position in the array must have a value that corresponds to the values in the same position in theAutoLinkFieldTypes andFieldNames arrays. In the following example, we pass an array that contains the 'Name' column name at array position 0.
- AutoLinkFieldTypes() An array of Long values from the VisAutoLinkFieldTypes enumeration, consisting of shape attribute types. At least one position in the array must have a value that corresponds to the values in the same position in theColumnNames andFieldNames arrays. In the following example, we pass the enumeration value visAutoLinkShapeText at array position 0.
- FieldNames() A string array consisting of shape values. At least one position in the FieldNames array must have a value that corresponds to the values in the same position in theColumnNames andAutoLinkFieldTypes arrays.
- For most values of AutoLinkFieldTypes, for example, visAutoLinkShapeText, it is not necessary to specify the FieldNames value; you can pass the null value instead. That is the case in our example, so we pass an empty string. However, when you pass the visAutoLinkCustPropsLabel, visAutoLinkUserRowName, visAutoLinkPropRowNameU, or visAutoLinkUserRowNameU values of AutoLinkFieldTypes, you must pass a value for FieldNames to fully specify the shape data item to compare to the data column name.
- AutoLinkBehavior A value from the VisAutoLinkBehaviors enumeration. These enumerated values provide options to customize the method, for example, to replace existing links with new ones. The following example passes the default value, 0.
- ShapeIDs() An array that the method fills with the IDs of linked shapes when it returns.
The following sample shows one way to use the AutomaticLink method to link shapes and data automatically. The sample assumes that you have connected your drawing to data in the OrgData.xls sample workbook, as explained above. Note that the code requires that the first column of data be named 'Name,' as is the case in OrgData.xls. Note also that the shape text of each of the shapes in your drawing that you want to link to data must match one of the names in the 'Name' column in OrgData.xls.
Discovering links between shapes and data
Use the following methods to determine which shapes are linked to data. Knowing how shapes are linked to data can help prevent conflicts and broken links:
Breaking links between shapes and data
As their names imply, you can use the Shape.BreakLinkToData and Selection.BreakLinkToData methods to break existing links between shapes and data programmatically. In addition, various changes made in the UI can break these links. For example, when users delete a data recordset, linked row, or linked shape, or when users click Unlink from Row on a shape's shortcut menu or Unlink on a row's shortcut menu, they can cause broken links.
Except when a user deletes a data recordset, row, or shape from the UI, all of these actions fire the Shape.ShapeLinkDeleted event. You can also use the methods listed in the previous section to determine link status.
Getting and setting data-column properties
Every DataRecordset object contains a DataColumns collection of all the DataColumn objects associated with the DataRecordset object. These objects allow you to map data columns to cells in the Shape Data section of the ShapeSheet.
The following sample shows how to get the value of the Label cell in the Shape Data section for the first column in the data recordset passed to the method and display it in the Immediate window. Then it sets the value and displays the new value.
Changing this value changes the label of the shape data item in the Shape Data dialog box for all shapes linked to rows in the data recordset. To get and set the Label cell value, we pass the visDataColumnPropertyDisplayName value from the VisDataColumnProperties enumeration to the DataColumn.GetProperty and DataColumn.SetProperty methods.
Refreshing linked data and resolving conflicts
When data changes in the data source to which your drawing is connected, you can refresh the data in your Visio drawing to reflect those changes. You can specify that Visio refresh data automatically at a specified interval by setting the DataRecordset.RefreshInterval property. You can refresh data programmatically by calling the DataRecordset.Refresh method.
In addition, you can resolve any conflicts in the relationship between shapes and rows of data. For example, conflicts can occur when you refresh the data recordset and some data rows to which shapes were linked before the refresh operation no longer exist, because of changes to the data source. Other conflicts are possible when two or more rows in the refreshed recordset have identical primary keys.
Refreshing linked data automatically
When you create a DataRecordset object, its RefreshInterval property value is set to the default, 0. This setting indicates that data is not refreshed automatically. By setting DataRecordset.RefreshInterval to a positive Long value, you can specify the time in minutes between automatic refreshes. The minimum interval you can specify is one minute. This setting corresponds to the value a user can set in the Configure Refresh dialog box.
To determine the date and time of the last refresh operation, get the DataRecordset.TimeRefreshed property.
Additionally, the DataRecordset.RefreshSettings property allows you to customize automatic refreshes of data. By setting this property to a combination of the values in the**VisRefreshSettings** enumeration, you can specify that either or both of the following occur:
- The UI for reconciling refresh conflicts (the Refresh Conflicts task pane) is disabled. (See the next section for more information.)
- Refresh operations automatically overwrite changes to data made in the UI. The default value for this property is 0, meaning that neither of these events occur.
Identifying data recordset rows for refresh operations
Because shapes are linked by their shape IDs to specific data rows, when Visio refreshes linked data, it must determine which rows in the linked data recordset or recordsets were added, changed, or removed since the last time the data was refreshed. To identify these rows, Visio uses the row IDs assigned to the rows in the data recordset. Visio can assign these row IDs two ways, depending on whether you designated primary keys for the data recordset when you created it.
Refreshing data recordsets that do not have primary keys
When you create a data recordset, Visio assigns row IDs to all the rows in the recordset based on the existing order of the rows in the data source. Accordingly, the first row in the recordset is always assigned row ID 1, the second row ID 2 and so forth.
Subsequently, you can add or remove data rows from the original data source. Then, when you refresh the data, the data recordset reflects those changes. As a result, row order in the data recordset may change.
For example, in a five-row data recordset, if the fourth row in the data source is removed, when Visio refreshes the data recordset connected to that data source, the fifth row in the data recordset becomes the new fourth row and is assigned row ID 4. Row ID 5 is removed from the data recordset.
As a result, shapes linked to row ID 5 loose their links, and shapes linked to row ID 4 now get data from the row previously in the fifth position. As you can see, not assigning primary keys to data recordsets when you create them can result in broken links between shapes and data, or in Visio linking shapes to rows other than the ones to which you want them linked.
Refreshing data recordsets that have primary keys
You can help prevent these broken or mismatched links by assigning primary keys to data recordsets. A primary key identifies the name of the data column or columns that contain unique identifiers for each row. The value in the primary key column for each row uniquely identifies that row in the data recordset. Primary keys are often ID values, but you can set any column or combination of columns to be the primary key. However, to get consistent results when you refresh data, it is essential that you make the primary key column value (or set of values for multiple primary key columns) unique for each row.
As a result, when you refresh or when Visio refreshes a data recordset that includes primary keys, its rows retain the same row IDs they had before the refresh operation. Because Visio links shapes to data rows by ID—shape ID to row ID—and because row IDs remain the same after a refresh operation, data-linked shapes remain linked to the correct row. Note that row IDs are never recycled for a given a data recordset.
You can use the DataRecordset.GetPrimaryKey method to determine the existing primary key for a data recordset, if one is specified. This method returns the primary key setting for the data recordset, as a value from the**VisPrimaryKeySettings** enumeration. You can use single or composite primary keys. A single key bases row identification on the values in a single column. A composite primary key uses two or more columns to identify a row uniquely.
If the primary key setting is visKeySingle or visKeyComposite, the method also returns an array of primary key column-name strings. If the primary key setting is visKeyRowOrder, the default, the method returns an empty array of primary keys.
Likewise, you can use the DataRecordset.SetPrimaryKey method to specify the primary key setting for the data recordset, as well as the name of the column or columns that you want to set as the primary key column or columns. Once again, when you set primary keys, make sure that the column or columns you pick to be primary key columns contain unique values (or value sets) for each row.
Refreshing linked data programmatically
To refresh a connected data recordset programmatically, call the DataRecordset.Refresh method.
Calling this method executes the query string associated with the data recordset and then updates the linked shapes with the data returned by the query. Calling the Refresh method on a particular DataRecordset object results in refreshing all other DataRecordset objects associated with the same DataConnection object (that is, having the same value for their DataConnection property). DataRecordset objects sharing the same DataConnection property value are called transacted data recordsets.
If calling Refresh results in conflicts, Visio displays the Refresh Conflicts task pane in the UI, unless you set the RefreshSettings property to include the visRefreshNoReconciliationUI enumerated value.
Before you refresh linked data, if you want to change the query Visio uses to retrieve the data to query a different table in the same database, set the DataRecordset.CommandString property to a new value. To connect to an entirely new data source, set both the DataRecordset.CommandString and DataConnection.ConnectionString property values.
The DataRecordset.GetLastDataError method gets the Active X Data Objects (ADO) error code, ADO description, and data recordset ID associated with the most recent error that resulted from adding a new data recordset or refreshing the data in an existing one.
Identifying and resolving conflicts
When you or Visio refreshes data and a resulting conflict occurs, you can use the DataRecordset.GetAllRefreshConflicts and DataRecordset.GetMatchingRowsForRefreshConflict methods to determine why the conflict arose. The GetAllRefreshConflicts method returns an array of shapes for which a conflict exists between data in the shape and data in the data-recordset row to which the shape is linked. To determine which data-recordset rows produced the conflict, you can then pass each of these shapes to the GetMatchingRowsForRefreshConflict method, which returns an array of rows that are in conflict.
Rows in the data recordset can conflict when two or more of them have identical primary keys, and may link to the same shape. When this occurs, GetMatchingRowsForRefreshConflict returns an array containing at least two row IDs.
Conflicts can also occur when a previously data-linked row from the data recordset is removed. When this occurs, the method returns an empty array.
To remove the conflict, pass the shape to the DataRecordset.RemoveRefreshConflict method, which removes the conflicting information from the current document.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
If you need more shapes than a particular Visio template provides, you have a couple of options. You can search your device for shapes that are installed with Visio, or you can search the web for shapes.
Tip: Not sure which version of Visio you're using? Open Visio and create a new diagram or open an existing one. Choose File in the top left corner, and then select either Account or Help from the list on the left. Under Product Information, you'll see the Visio product name followed by the version number (for example: Visio 2013). Select the tab below that matches your version of Visio.
Note: If you cannot see the Search Shapes text box in the Shapes panel above More Shapes, then you need to check the Show Shape Search pane option in File / Options / Advanced / Shape Search.
Office 365Office 2016 – 2019Office 2013Office 2010Office 2007
Find shapes and stencils in Visio Online Plan 2
You can search for shapes and stencils that are local to your device. You can also search for stencils that are online, created by third-parties or Microsoft.
Note: In order to use this feature, you must have an Office 365 subscription. If you are an Office 365 subscriber, make sure you have the latest version of Office. If you are an IT professional managing the Office 365 update process, check out the channel releases page to learn which updates are provided in each channel.
- In the search box at the top of the Shapes pane, enter a key word or phrase (e.g. 'triangle').Note: If you don’t see the search box, you might need to activate it. Click the View tab, then select Task Panes > Shapes. Still don't see the search box? Click the > symbol at the top of your ruler on the left hand side of your screen.
- Under Local, the search results are displayed and categorized by their Visio stencil title.
- Under Online, if available, you'll see shapes on the web by other companies, including Microsoft. To access those shapes, do the following:a. Click the stencil to see a preview.b. To put the stencil in your My Shapes folder, click Download.c. After it has downloaded, click Open to display the stencil in the Shapes pane.
- To reset the search in the Shapes pane, delete the search string in the search box so that it displays the prompt, Search shapes.
The default option for search is to search for text that matches All of the words (AND). Although the search is not case-sensitive, it does match on whole words. For example, 'Air Cond' will not find the 'Air Conditioner' shape when this is the selected option.
However, if the option is changed to Any of the words (OR), then the 'Air Conditioner' shape will be matched because its name contains the word 'Air'.
When you select one of the found master shapes in the Local results, and drag it onto the page, a copy of the master shape is first added to the Document Stencil. You can drag and drop this master shape from there subsequently, rather than searching for it again.
Check Shapes More Shapes Show Document Stencil to view the master shapes currently used in the document.
The search also checks the Keywords of the shapes. For example, searching for the word 'Tile' appears to mistakenly match with 'Square stone', however, an examination of the Keywords of the master shape reveals that it does contain the word 'tile'.
Editions of Microsoft Visio that have an online subscription also have the ability to search for shapes in a number of third party stencils hosted by Microsoft. For example, searching for the word 'Tile' shows that it is also found in an online stencil, which can then be selected and downloaded. This will download the whole stencil in your My Shapes folder in a sub-folder named after the third-party provider. These stencils, and all of the master shapes within them, are immediately available to use in the current and subsequent sessions. These stencils have been vetted by Microsoft and are safe to use.
Find shapes on the web
If you have an Internet connection, you can search the web for shapes.
You can find shapes by searching the Microsoft Download Center for Visio shapes.
Visio shapes are also created by people and companies outside of Microsoft. If you are looking for some very specific or unusual shapes, you might try non-Microsoft providers such as these:
- Equipment manufacturers If you are looking for shapes that represent specific pieces of equipment, you can often find them at the equipment manufacturer's website.
- Most Valuable Professionals (MVPs) Visio MVPs Visio MVPs are Visio experts who freely answer questions and offer solutions, tips, and suggestions, most often in the Visio discussion groups. You can find often stencils of shapes on their web sites.
- Other external sites Some sites on the web run by independent Visio users and businesses offer shapes and other downloads such as Visio Cafe.
For more information, see Import downloaded stencils and Create, save, and share custom stencils.
Find shapes and stencils in Visio 2016 and Visio 2019
You can search for shapes and stencils that are local to your device. You can also search for stencils that are online, created by third-parties or Microsoft.
Note: In order to use this feature, you must have an Office 365 subscription. If you are an Office 365 subscriber, make sure you have the latest version of Office. If you are an IT professional managing the Office 365 update process, check out the channel releases page to learn which updates are provided in each channel.
- In the search box at the top of the Shapes pane, enter a key word or phrase (e.g. 'triangle').Note: If you don’t see the search box, you might need to activate it. Click the View tab, then select Task Panes > Shapes. Still don't see the search box? Click the > symbol at the top of your ruler on the left hand side of your screen.
- Under Local, the search results are displayed and categorized by their Visio stencil title.
- Under Online, if available, you'll see shapes on the web by other companies, including Microsoft. To access those shapes, do the following:a. Click the stencil to see a preview.b. To put the stencil in your My Shapes folder, click Download.c. After it has downloaded, click Open to display the stencil in the Shapes pane.
- To reset the search in the Shapes pane, delete the search string in the search box so that it displays the prompt, Search shapes.
The default option for search is to search for text that matches All of the words (AND). Although the search is not case-sensitive, it does match on whole words. For example, 'Air Cond' will not find the 'Air Conditioner' shape when this is the selected option.
However, if the option is changed to Any of the words (OR), then the 'Air Conditioner' shape will be matched because its name contains the word 'Air'.
When you select one of the found master shapes in the Local results, and drag it onto the page, a copy of the master shape is first added to the Document Stencil. You can drag and drop this master shape from there subsequently, rather than searching for it again.
Check Shapes More Shapes Show Document Stencil to view the master shapes currently used in the document.
The search also checks the Keywords of the shapes. For example, searching for the word 'Tile' appears to mistakenly match with 'Square stone', however, an examination of the Keywords of the master shape reveals that it does contain the word 'tile'.
Find shapes on the web
If you have an Internet connection, you can search the web for shapes.
You can find shapes by searching the Microsoft Download Center for Visio shapes.
Visio shapes are also created by people and companies outside of Microsoft. If you are looking for some very specific or unusual shapes, you might try non-Microsoft providers such as these:
- Equipment manufacturers If you are looking for shapes that represent specific pieces of equipment, you can often find them at the equipment manufacturer's website.
- Most Valuable Professionals (MVPs) Visio MVPs Visio MVPsare Visio experts who freely answer questions and offer solutions, tips, and suggestions, most often in the Visio discussion groups. You can find often stencils of shapes on their web sites.
- Other external sites Some sites on the web run by independent Visio users and businesses offer shapes and other downloads such as Visio Cafe.
For more information, see Import downloaded stencils and Create, save, and share custom stencils.
Find shapes in Visio 2013
You can use the search box to find shapes installed with Visio. The search box is in the Shapes window, in a separate tab from the stencils.
Note: If you don’t see the search box, you might need to activate it. Click the View tab, then select Task Panes > Shapes. Still don't see the search box? Click the > symbol at the top of your ruler on the left hand side of your screen.
Quick Tasks
Task | Action |
---|---|
Save search results as a new stencil. | Right-click the title of a stencil in the search results, and then click Save As. Type a name for the stencil, and save it in your My Shapes folder. |
Save an individual shape to your Favorites stencil or a different stencil. | In the Stencils view in the Shape window, right-click the shape, and point to Add to My Shapes. Then click Favorites to add the shape to your Favorites stencil. You can also click Add To New Stencil to create a stencil that contains only that shape, or click Add to Existing Stencil to select a stencil, for example from your My Shapes folder. |
Open a saved stencil. | In the Shapes window, click More Shapes, point to My Shapes, and then click the stencil name. |
Expand or refine your search. | You can choose whether searches for shapes use all of the words that you enter or any of the words that you enter. For example, if you enter 'office chair' as a search in the Shapes window, the search can be for shapes that are related to both 'office' and 'chair,' or for shapes that are related to either 'office' or 'chair' (or both). Choose the first type of search, AND, when you only want results that are related to all of the words that you enter. Choose the second type of search, OR, when you want to see more search results and matching all words is not necessary. To set search options
Tip: Shape Search uses Windows Search to find shapes on your computer, so if you don’t get any search results, it might be because Windows Search is off. In Control Panel, click Programs, then click Turn Windows Features on or off, and in the Windows Features box, check the Windows Search checkbox. |
Find shapes on the web
If you have an Internet connection, you can search the web for shapes.
You can find shapes by searching the Microsoft Download Center for 'Visio shapes.' Here are some of the shapes you can download:
Visio shapes are also created by people and companies outside of Microsoft. If you are looking for some very specific or unusual shapes, you might try non-Microsoft providers such as these:
- Equipment manufacturers If you are looking for shapes that represent specific pieces of equipment, you can often find them at the equipment manufacturer's website.
- Most Valuable Professionals (MVPs)Visio MVPs are Visio experts who freely answer questions and offer solutions, tips, and suggestions, most often in the Visio discussion groups. You can find often stencils of shapes on their web sites.
- Other external sites Some sites on the web run by independent Visio users and businesses offer shapes and other downloads.
Save the downloaded stencils
After you download a stencil of shapes, copy it to your My Shapes folder. By default, your My Shapes folder is located inside your default Documents folder. Then, open the stencil in Visio by navigating to My Shapes.
To open a stencil saved in My Shapes
- In the Shapes window, click More Shapes, point to My Shapes, and then click the stencil name.
Find shapes installed with Visio 2010
The Search for Shapes feature uses the Windows Search service to search the Visio stencils that are installed on your computer. The Windows Search service must be running to enable quick searching.
When you first start Visio, the Search for Shapes box is hidden to leave more room for shapes.
- In the Shapes window, click More Shapes, and then click Search for Shapes.
- In the Search for Shapes box, type one or more words that describe the shape you want. You can separate the words with spaces, commas, or semicolons.For example, to find shapes that represent office chairs, type office chair.
- Click the magnifying glass icon or press ENTER.The results are added to a search results stencil.
Quick Tasks
Task | Action |
---|---|
Save search results as a new stencil. | Right-click the title bar of the search results stencil, and then click Save As. Type a name for the stencil and save it in your My Shapes folder. |
Save an individual shape to your Favorites stencil or a different stencil. | Right-click the shape, point to Add To My Shapes, and then click Favorites to add the shape to your Favorites stencil. You can also click Add To New Stencil to create a stencil that contains only that shape, or click Add to Existing Stencil to select a stencil, for example from your My Shapes folder. |
Open a saved stencil. | In the Shapes window, click More Shapes, point to My Shapes, and then click the stencil name. |
Expand or refine your search. | Set Visio search options:
For example, to find office chairs and no other kind of chair, select All of the words (AND) under Search for, and click OK. Then type office chair in the Search for Shapes box. If you want to find chairs and tables, select Any of the words (OR) under Search for, and click OK. Then type chair table in the Search for Shapes box. |
Find shapes on the web
If you have an Internet connection, you can search the web for shapes.
You can find shapes by searching the Microsoft Download Center for 'Visio shapes.' Here are some of the shapes you can download:
Visio shapes are also created by people and companies outside of Microsoft. If you are looking for some very specific or unusual shapes, you might try non-Microsoft providers such as these:
- Equipment manufacturers If you are looking for shapes that represent specific pieces of equipment, you can often find them at the equipment manufacturer's website.
- Most Valuable Professionals (MVPs)Visio MVPs are Visio experts who freely answer questions and offer solutions, tips, and suggestions, most often in the Visio discussion groups. You can find stencils of shapes on the Visio MVP site, an independent website that is entirely managed by the Visio MVPs.
- Other external sites Some sites on the web run by independent Visio users and businesses offer shapes and other downloads, including Visio Café.
Save the downloaded stencils
- After you download a stencil of shapes, copy it to your My Shapes folder. By default, your My Shapes folder is located in the [drive]:Usersuser nameDocumentsMy Shapes folder.
- To open the stencil, in the Shapes window, click More Shapes, point to My Shapes, and then click the stencil name.
Find shapes installed with Visio 2007
In Visio, you can use the Search for Shapes box to search for shapes. The Search for Shapes feature searches the Office Visio stencils that are installed on your computer. If you have an Internet connection, it can also search Microsoft websites for new and updated Visio shapes.
- To open the Shapes window, if it is not already open, on the View menu, click Shapes Window.
- In the Search for Shapes box, type one or more words that describe the shape you want. You can separate the words with spaces, commas, or semicolons.For example, to find shapes that represent office chairs, type office chair.Tip: To expand or refine your search, click the Shape Search tab in the Options dialog box (Tools menu). For example, to find office chairs and no other kind of chair, select All of the words (AND) under Search for, and click OK. Then type office chair in the Search for Shapes box. If you want to find chairs and tables, select Any of the words (OR) under Search for, and click OK. Then type chair table in the Search for Shapes box.
- Click or press ENTER.The results are added to a search results stencil.
- When you find the shape you want, drag it onto the drawing page if you want to use it immediately.Tip: If you find a shape and want to find more like it, drag the shape to your drawing, right-click the shape, point to Shape, and click Find Similar Shapes. Office Visio searches for other shapes that share the keywords associated with the selected shape and adds the shapes to a search results stencil.
- To save the shape or shapes, do one of the following:
- To save your search results as a stencil, right-click the title bar of the search results stencil, and then click Save As.
- To save an individual shape to a custom stencil, right-click the shape, point to Add To My Shapes, and then click Favorites, another stencil name, or Add to Existing Stencil.
Tip: To quickly open a saved stencil, on the File menu, point to Shapes, point to My Shapes, and then click the stencil name.
Note: When you use the Search for Shapes feature in Visio to search on the Internet, the search finds only shapes that are provided by Microsoft. These shapes are copyrighted. You may copy and reorganize the shapes for your own use, modify them for your own use, and distribute drawings that contain them. However, you may not sell or distribute original or modified Visio shapes.
Download shapes from the Microsoft Download Center
You can find shapes by searching the Microsoft Download Center for 'Visio shapes.' For example, these sets are available:
Find shapes developed by others
If you have an Internet connection, you can use your browser to search for more Visio shapes:
- Equipment manufacturers If you are looking for shapes that represent specific pieces of equipment, you can often find them at the equipment manufacturer's website.
- Most Valuable Professionals (MVPs) Visio MVPs are Visio experts who freely answer questions and offer solutions, tips, and suggestions, most often in the Visio discussion groups. You can find stencils of shapes on the Visio MVP site, an independent website that is entirely managed by the Visio MVPs.
Save the downloaded stencils
- After you download a stencil of shapes, copy it to you're my Shapes folder. By default, you're my Shapes folder is located in C:Usersuser nameDocumentsMy Shapes
- To open the stencil, on the File menu, point to Shapes, point to My Shapes, and then click the stencil name.