Chris Hopkins' Blog - #makinitdostuff

The place where I post information about the products I manage; SharePoint, Yammer, Project and Visio and maybe from some that I don't!

Enable Visio Services data refresh using script

Enable Visio Services data refresh using script

  • Comments 1

In a previous post I showed you how to edit the web.config file to disable the data refresh prompt so that diagrams will always refresh when rendered, http://blogs.msdn.com/b/chhopkin/archive/2010/09/28/force-data-refresh-for-published-diagrams.aspx.  This method affects all diagrams that are viewed in the browser or rendered in the Visio Web Access web part.

If you do not have access to the web.config or if you only want to enable this on a spceific page you can use the included script which triggers refresh for the diagram when the user navigates to the diagram.

For a web part page that includes the Visio Web Access web part you can add an HTML Forms web part and copy the attached JavaScript into its source.  The source that I attached to this article also includes my VWA helpers library which contains my enableRefresh function.  It also includes a copy of the standard JQuery library.  Typically I upload these two libraries to a SiteAssets library and reference them from within my script as you can see in the AutoRefresh.js file with the included attachment.

Attachment: autorefresh_script.zip
Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post
  • This works perfectly...thanks!

Page 1 of 1 (1 items)