Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows Server

Microsoft SharePoint 2013 : Working with Visio Services - Customizing Visio Services solutions

4/1/2014 2:31:28 AM
There are two ways of customizing the out-of-the-box experience of Visio Services solutions:
  • Creating custom data providers using server-side code

  • Enhancing the interactivity of your dashboards that include the Visio Web Access Web Part by manipulating the different Visio diagram objects programmatically using browser client-side code

The following two sections detail the options that developers have for writing code against Visio Services.

Note

You can also create client application-level add-ins for Visio. However, such solutions that are data driven within Visio, if they are not using the Data Linking feature, may be data driven when displayed in Visio Services.

Server-side customizations

Custom data providers can be created to allow data linking to external sources where an out-of-the-box data connector is not provided. In SharePoint 2013, where BCS and External Lists can be used with Visio Services, the need to develop custom data providers should be less than in SharePoint Server 2010. Of course, you cannot build and deploy custom data providers in a multitenant solution, such as Office 365.

Custom data providers require the development of a custom .NET assembly that implements the Visio Services Data Provider Interface, Microsoft.Office.Visio.Server.Addon-DataHandler. Once created, the assembly needs to be deployed into the global assembly cache (GAC) on each server in the SharePoint farm. The custom data provider then needs to be added within the SharePoint Central Administration website as a Visio Graphics Service trusted data provider.

Visio Services JavaScript mashup APIs

You can enable rich interactivity on your Web Part page by manipulating the different Visio diagram objects programmatically. A typical example of this type of interactivity is to show custom visual overlays when the person viewing the diagram pauses over a particular shape. You should use these APIs when:

  • Functionality is needed that cannot be handled by web part connections. Web part connections do not provide the user experience that is expected today.

  • Using JavaScript or HTML 5 canvas provides extra visualization to your diagram.

Before your solution can interact programmatically with a Visio drawing on the Web Part page, you must add a Visio Web Access Web Part. This automatically adds the Visio Services JavaScript API to the page. This API is an embedded resource in the dynamic-link library (DLL), not on the file system.

Create a JavaScript (.js) file that contains the code you want to interact with the Visio drawing and save it to the same SharePoint library where the Visio diagrams are stored. Next, add a web part to the page that can be used to link the .js file to the page. Typically, a Content Editor Web Part is used to link the .js file, but you can use the HTML Script command.

The mashup API has a basic hierarchy that consists of four main classes:

  • Vwa.VwaControl . Use this class to control Visio objects at the Visio drawing level, where the drawings are those contained in the file displayed associated with the Visio Web Access Web Part. You can access the web part properties, assign which diagram in the file to display, iterate and display a page in a multipage diagram, manage user interaction with the drawing by adding or removing event handlers, and also show and hide custom HTML error messages. When a diagram is visible, the only page object that can be accessed is the page that is displayed in the web part. The JavaScript cannot iterate through all page objects – there are developer tricks that can be used to load each page and cache the page objects and then iterate through the page objects in the cache.

  • Vwa.Page . Use this class to access a page object within the Visio drawing and not the web page. You can change the zoom center, zoom percentage, change the currently selected shape, and get a reference to the collection of shapes in the currently displayed page.

  • Vwa.ShapeCollection . Use this class to iterate through all the shapes on a page. Some diagrams may take a while to display; therefore, before iterating through all the shapes in a shape collection object, you need to wait for the diagram complete event.

  • Vwa.Shape . Use this class to manage a single shape, such as drawing a colored rectangle around the bounding box of the shape—known as highlighting or overlaying the shape with a particular shape (for example, a pushpin icon placed on top of a map).

Validation

Visio 2010 Premium introduced an extension to the Visio Type Library called the Validation API. On the Ribbon Process tab, there are commands in the Validation group that provide access to the visible parts of the Validation API. Users can click Check Diagram to analyze a diagram to verify that the diagram is properly constructed and complies with a set of rules. If there are any errors or issues with various aspects of the diagram, such as layout, connectivity, data values, or formatting, then they are listed in the Issues Window.

In Visio 2013 Professional, templates with built-in rules include Basic Flowchart, Cross-Functional Flowchart, Business Process Modeling Notation (BPMN), Six Sigma, and SharePoint workflows. These templates can be used to create diagram, ensuring diagram consistency against industry-standard diagram rules, or custom rules designed for a particular company or government regulations, such as Sarbanes–Oxley (SOX), BASEL II, and quantity assurance (QA).

Other -----------------
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 4) - Adding data graphics , Web part connections
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 3) - Mapping external data to shapes
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 2) - Refreshing external data
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 1) - Obtaining external data
- Microsoft SharePoint 2013 : Looking at Visio Services (part 4) - Visio Services security considerations,Supported data scenarios
- Microsoft SharePoint 2013 : Looking at Visio Services (part 3) - Visio Graphics Service service application
- Microsoft SharePoint 2013 : Looking at Visio Services (part 2) - Adding a Visio Web Access Web Part to a page
- Microsoft SharePoint 2013 : Looking at Visio Services (part 1) - Displaying Visio drawings in Visio Services
- Microsoft Exchange Server 2013 : Mailbox management - Seeking perfection halts progress (part 3) - Changing EAC columns
- Microsoft Exchange Server 2013 : Mailbox management - Seeking perfection halts progress (part 2) - Starting EAC
- Microsoft Exchange Server 2013 : Mailbox management - Seeking perfection halts progress (part 1)
- Microsoft Exchange Server 2010 : Defining Email Addresses (part 3) - Email Address Policies - Creating a New Email Address Policy
- Microsoft Exchange Server 2010 : Defining Email Addresses (part 2) - Email Address Policies - Changing an Existing Policy
- Microsoft Exchange Server 2010 : Defining Email Addresses (part 1) - Accepted Domains
- Microsoft Exchange Server 2010 : Basics of Recipient Management - Exchange Recipients
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 7) - Using iSCSI Initiator - Creating volumes
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 6) - Using iSCSI Initiator - Establishing a connection
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 5) - Using iSCSI Initiator - Discovering targets
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 4) - Using iSCSI Initiator - Configuring iSCSI Initiator
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 3) - Configuring iSCSI Target Server - Creating iSCSI virtual disks
 
 
Most view of day
- SharePoint 2013 Request Management (part 1) - The Request Management Process
- System Center Configuration Manager 2007 : Operating System Deployment - Task Sequences (part 3) - Task Sequence Targeting
- Adobe Dreamweaver CS5 : Using Library Items and Server-side Includes (part 2) - Using the Library Assets Panel - Inserting a Library item in your Web page
- Exchange Server 2007 : Deploying a Cluster Continuous Replication Mailbox Cluster (part 2)
- Sharepoint 2013 : Get to a Site’s Permission Management Page (part 2) - Check What Permissions a User or a Group Has on a Site
- Windows Server 2003 on HP ProLiant Servers : The Physical Design and Developing the Pilot - Time Services (part 1) - Time Services Role in Authentication
- BizTalk 2010 : WCF LOB SQL Adapter - Consuming ASDK SQL Adapter in Visual Studio (part 1)
- Microsoft Dynamic CRM 4 : Data Migration (part 4) - Creating a Data Migration
- Windows Server 2003 : Protecting Hosts with Windows Host Firewalls - Routing and Remote Access Basic Firewall
- Windows Server 2012 Group Policies and Policy Management : GPO Administrative Tasks - Backing Up and Restoring Domain GPOs
Top 10
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 3) - Creating IPv4 DHCP Scopes
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 2) - Installing DHCP Server and Server Tools
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 1)
- Windows Server 2012 : DHCP,IPv6 and IPAM - Understanding the Components of an Enterprise Network
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 3) - Translating Text with the Mini Translator
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 2) - Translating a Word or Phrase with the Research Pane
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 1) - Setting Options for the Research Task Pane, Searching with the Research Task Pane
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 2) - Ending a Linked Notes Session, Viewing Linked Notes
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 1) - Beginning a Linked Notes Session
- Microsoft OneNote 2010 : Doing Research with Side Notes (part 3) - Moving Side Notes to Your Existing Notes
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro