Visio Services allows users to save and share their Visio
drawings to a SharePoint site. You can use Visio Services to render a
Visio drawing that people can view in their browser. Since Visio
Services does all of the rendering, anyone can view the Visio drawing
without having Visio or the Visio Viewer installed on the computer.
Note
The Visio 2013 Viewer can be downloaded at www.microsoft.com/en-us/download/details.aspx?id=35811.
The power Visio
Services can add to your solutions with very little effort is often
overlooked. Simply because the eye is plugged directly into your brain
and the eye is our primary sense, users can easily distinguish between
differences in color, shape, size, and form. When users are presented
with a large list of data, they have to read that data and interpret
them and then do some kind of calculation or comparison. By default,
SharePoint tends to present data in a tabular form; however, it is far
easier if someone else has already done the calculations/comparison and
presents the results visually so that users can see what the data is
telling them quickly, with a single look.
Note
Visio Services can be used to display visualizations of SharePoint
2010 workflow instances in the browser. Visio visualizations cannot be
used with SharePoint 2013 workflow instances. However, you can use
Visio drawings to create and modify both SharePoint 2013 and SharePoint
2013 workflows using the Visio client application; and in SharePoint
Designer, you use the built-in Visual Designer, which is a Visio
ActiveX control, to create and modify SharePoint 2013 workflows.
When you upload a Visio file into SharePoint and it is presented in
the browser using Visio Services, it is considered as a read-only file
(except for commenting). You cannot change Visio diagrams using Visio
Services, or the data in a Visio file, you need to use the Visio client
application to do that; however, the diagrams can react to changes in
the data if the data they are based on is external to the file; that
is, the diagrams can be data driven. Connecting data to Visio diagrams,
known as data linking, must be configured using Visio 2010 Professional, Visio 2010 Premium, or Visio Professional 2013.
Note
When Visio is teamed with a SharePoint 2010 or SharePoint 2013
environments, users do not need to know how to create the Visio
diagrams, nor do the creators of the Visio Services solutions need to
write code. By using the standard, out-of-the-box features of both
Visio and SharePoint, the creator can create integrated solutions
without writing code. The development life cycle of Visio Services
solutions involve three basic players:
-
Creator
. The creator understands the business data, is aware
of the trends and significant changes in the data, as well as knowledge
of the overall business process in the organization. Creators may not
write code or necessarily understand the technical intricacies of
software product development; however, they do know the business
systems that host the data for the Visio Services solution. They will
create the Visio diagrams, connect those diagrams to business data, and
then upload the Visio diagrams to SharePoint and build any dashboards.
-
Consumer
. Users
of the Visio Services solution must know how to interact with the
solution developed by the creator of the solution. In many ways, the
solution will be similar to other solutions built with SharePoint, such
as the use of web part connections or the solutions built using
Business Connectivity Services (BCS) or Excel Services.
-
Developer
. A developer extends the out-of-the-box functionality
of Visio and SharePoint by using the Visio Services class library, in
the Microsoft.Office.Visio.Server namespace and the JavaScript object
model in the Vwa namespace in Visio Services, as well as other parts of
the SharePoint object model.
In SharePoint Server 2013, Visio Services renders diagrams created in either of the following:
-
Visio 2010
. These must be created using Visio 2010 Professional
or Visio 2010 Premium and must be published to a SharePoint site as a
Visio web drawing (*.vdw) file. Standard Visio 2010 diagrams (.vsd
files) are not rendered by Visio Services and require Visio 2010, Visio
2013, or Visio Viewer to be viewed.
-
Visio 2013
. These must be created using Visio Professional 2013.
The new standard diagram format in Visio Professional 2013 (*.vsdx
files) can be rendered by Visio Services, along with web drawings
(.vdw) format. You should use the new .vsdx format unless you require
compatibility with previous versions of Visio.
1. Displaying Visio drawings in Visio Services
When you click a Visio file in a SharePoint library, by default the
Visio diagram opens in a webpage for a full-screen viewing experience,
as shown in Figure 1.
The SharePoint page hosts an instance of the Visio Web Access Web Part, where the URL of the page is <SharePointSiteURL>/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?id=<fileURL>&Source=<pageURL>, where:
-
<file URL> is the relative address of the location of the Visio file, such as /sites/IT/Workflow/Shared_Documents/Contoso_Sales_Process.vsdx.
-
<pageURL> is the URL of the page where you clicked the name of the Visio file, such as the All Items view of a document library: http___intranet_adventure_works_com_sites_IT_Workflow_Shared_20Documents_Forms_AllItems_aspx.
At the top of the Visio Web Access page is a breadcrumb that allows you to navigate to the page you were previously on, <pageURL>. If you click the cross (x) in the upper-right corner of the Visio Web Access page, you will also be redirected to <pageURL>. Below the breadcrumb are four links:
-
Open in Visio
. Click this link to open the Visio drawing in the
Visio client application. This requires that Visio or Visio Viewer is
installed on your computer. A Microsoft Office dialog box opens,
warning you that some files can contain viruses that are harmful and
that it is important to be certain that the file is from a trustworthy
source. Once you have clicked Yes in the dialog box, Visio will open.
You can also click the file name in the breadcrumb to open the file in
Visio.
-
Refresh
. Use this link to refresh the page. When the Visio
diagram is linked to an external data source and that content has
changed since the last refresh, the new data appears in the diagram.
Changes in the data source might not be immediately reflected by
refreshing the diagram, depending on the data caching settings for
Visio Services. In SharePoint 2013, refreshing can now alter all
shapes, shape styling, and calculated shape data during a refresh, and
that BCS is now a supported data source for refreshable data.
-
Shape info
. Click this link to open the Shape Information pane
and then select a shape in the drawing to view detailed information
about the shape, as shown in Figure 2.
The
pane can be repositioned by dragging the title bar of the pane using
the left mouse button (floating), or it can be docked. You can also
resize the window by grabbing one of the borders of the pane and
dragging it. If a shape has a hyperlink, when you pause the mouse over
the shape, the Pointer tool changes to show that it can be clicked.
Select the shape, and then click it again to follow the link.
Hyperlinks are also displayed in the Shape Information pane, which is
useful for shapes that contain more than one hyperlink.
-
Comments
. Use this link to open the Comments pane. When the
drawing is saved in SharePoint and viewed in the browser by using Visio
Services, users who do not have the Visio client application can add
comments to a shape or at the page level which are indicated by a cloud
icon, as shown in Figure 3. Commenting is not supported for .vdw or the older binary Visio file formats.
You
can view all comments in the Comments pane. You can add, edit, and
delete comments within the Visio client application. Comments are
stored as part of the Visio file (.vsdx); therefore, you need to save
the file to save your comments, and therefore comments in Visio files
are similar to using comments in other Office applications, such as
Word. Depending on the configuration of your SharePoint library, when
you are editing a draft version, then comments may only be seen by
other contributors and would only be seen by all users when the .vsdx
file is published as a major version. To display the Comments pane in
Visio, click Comments Pane on the Review Ribbon tab in the Comments
group.
Visio Services includes new JavaScript APIs to read comments from a page or shape in a diagram.
Visio diagrams can have multiple pages, and in the footer of the
webpage is the number of pages in the diagram. At the top of the page,
to the right of the breadcrumb, is a Page Navigation box, which you can
use to view the page you want to see, as shown in Figure 4.
Selecting a different page will cause Visio Services to load and render
that page, as well as update and link data and data graphics.
You can click and drag the diagram around the webpage to
view specific parts of the diagram. Use the zoom tools in the footer to
change the size of the diagram and to make the entire diagram visible
in the browser window.