When I speak to SharePoint developers about the dashboard and API capabilities of Visio Services the first question I get asked is, “Can I link shapes in Visio 2010 to an External List and have Visio Services refresh the data in the published diagrams from the External List?”. The short answer is no, Visio 2010 and Visio Services support the following data sources out of the box for refresh on both the client and the server: SQL Server, Excel Services, SharePoint Lists, and OLE DB / ODBC.
Fortunately, both Visio 2010 and Visio Services have a fantastic extensibility model, giving you the ability to build a solution that will allow both the client and the server to link to any data source that is not supported out of the box.
Introducing the BDC Connector for Visio
For this article I am releasing a sample solution which allows both Visio 2010 Professional and Premium and Visio Services to connect to and refresh from an External List hosted on a SharePoint 2010 site. This solution is broken into 2 separate components; (1) An add-in for the Visio 2010 client giving the user the ability to establish a connection to an External List and link the data to the shapes in their diagram; (2) A custom data adapter that provides Visio Services with the ability to refresh the data from the connection that is established with the External List.
The client add-in
After installing the BDC Connector for Visio a new group, “External Lists”, will be visible on the Data tab in the Ribbon as shown below.
Clicking the Link Data to Shapes button simply prompts the user to enter the name/URL of the SharePoint site where the External List resides. Once a valid site name/URL has been entered the user can then choose the dropdown button to see a list of all External Lists available from the provided site.
Simply select the appropriate External List and click the OK button. After clicking the OK button, the add-in will attempt to connect to the External List and import all the data from the list as an External Data record set.
An example of an External Data record set is shown below…
Once the data from the External List has been connected to the diagram the user can use the standard out of box Data Linking and Data Graphics features to link the rows of data from the External List to shapes in the diagram, and surface the data using Data Graphics.
For an overview of Data Graphic capabilities please review this article, Enhance your data with Data Graphics
The custom data adapter
As part of this solution I also provided the custom data adapter for Visio Services which enables published diagrams to be refreshed from an External List by Visio Services automatically.
If you are not familiar with Visio Services then take a look at this article, Introducing Visio Services.
The VisioBdcDataModule.ZIP file included with the download contains the WSP solution package and the scripts to deploy and retract the solution package to your farm.
Open the SharePoint Management Console as an administrator
and run the InstallDataModule.ps1 script.
This will install and register the data module with Visio Services. If needed the RemoveDataModule.ps1 script can be run to retract the data module from your farm.
Click the link below to download the ZIP package. The ZIP package contains a complete users guide that outlines installation on the client and the server as well as a simple tutorial.
Visio 2010 Professional or Premium SharePoint 2010 Client Runtime (free download)
I've got an issue in refreshing data source, when I click Refresh button in Visio Web Access Web Part my data aren’t refreshed and there’s no error. I done everything from Getting Started.docx, maybe I missed some step. Could you tell me what can cause this?
In addition standard refresh in Visio also not working, refresh can be made only with your add-in.
Thanks in advance
Thanks in advance.
I found that your solution is language independent. When I’m using site collection in language different then English it’s not working.
Could you please provide some update to resolve my issue? Or could you send me your solution code and I will point you language problems, my email address is s.bialy(at)lgbs.pl.
We are doing our internship in a company that uses SharePoint 2010. We are developping a BCD model to retrieve external data.
That external list has to be shown in Visio. This works great with your add-in. But we want te use a parameter to build our query.
We do this by using the title of te list:
Dim oList As SPList = SPContext.Current.List
Dim title As String = oList.Title
But if we do this, the add-in doesn't show any data(columnnames are shown but nothing else). Do you know how to fix this? Our an other way to retrieve the title?
Can we create new shapes based on data or only work with existing shapes?
This solution works great in some environments, but I am in need of a FIPS compliant soltuion. Is there one that exists without altering my system registry (FIPS compliance is a requirement on my system)?
Visio 2013 natively supports External Lists and so does Visio Services in SharePoint 2013 / Office 365.
Yes, thanks for the information. Not a chnace of us moving to SP 2010 anytime soon. Do you have any tutorials on how you wtote this solution? It works so perfectly and something I have been searching for, but what I need it for is an https site and FIPs compiant. If not any ideas on where other similar soluions/tutorials are. thanks
Is there any chance you could publish the code for this file? This is the only solution that has come close to what I need and works great in one dev environment....but I do have a requirement to work this on SharePoint 2010 on an https site, which has to be FIPS compliant. The only way I can curerently do it is to create a second list with external content columns and require the 3 refresh cycles. These 3 refeshes are really killing my project. Any other ideas, tutorials, code file?
The code has been published. See the ZIP file attached to this posting.