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!

Visio Shape Property Viewer visual web part v1.0

Visio Shape Property Viewer visual web part v1.0

  • Comments 3

I am releasing a Visual Web Part that I have developed that is to be used in conjunction with the Visio Web Access web part to give you an alternate ( and more customizable ) method for viewing the Shape Data property values and Hyperlinks for a shape that you select from a published Visio diagram.

image

Features of this web part include

  • Automatically connects to the Visio Web Access web part to display Shape Data value and hyperlinks that are defined on the selected shape.
  • Any Shape Data values that match email address patterns are formatted as email links to allow you to easily create an email message directly from the selected Visio shape.
  • Any Shape Data values that match URL patterns are formatted as URL links allowing you to easily navigate to the URLs, even if they were not formatted are hyperlinks in the original Visio diagram.
  • Hyperlinks that are automatically created when Data Linking to SharePoint lists that contain Hyperlink formatted columns are automatically updated to not include both the URL and the description property values from the SharePoint list.  These column types are not handled properly when the hyperlinks are displayed in the built in Shape Information Pane.

Deployment

The web part is contained is a package that needs to be deployed using PowerShell.

Note: before running these command ensure that the Administrator service and the Timer service for SharePoint are running.

image

image

1. First add the solution to the solution store by running the following command:

add-spsolution c:\users\chris\desktop\visioshapepropertyviewer.wsp

This should succeed with the following results:

Name                           SolutionId                           Deployed
----                           ----------                           --------
visioshapepropertyviewer.wsp   d20a6400-aaa6-4e5a-aa84-021da11c0aac False

2. Next execute the install-spsolution command to deploy the solution from the store to the farm:

install-spsolution -identity visioshapepropertyviewer.wsp -gacdeployment -webapplication http://mytestsrv/

3. Finally double check to make sure the solution was deployed to the farm:

get-spsolution

The last column will tell you if the solution was deployed to the farm or not:

Name                       SolutionId                          Deployed
----                           ----------                           --------
visioshapepropertyviewer.wsp   d20a6400-aaa6-4e5a-aa84-021da11c0aac   True

Activate the Site Collection Feature

Once the package is deployed you will need to activate it as it is configured as a Site Collection Feature.

From the Site Setting page from the site collection select ‘Site collection features’ from the Site Collection Administration section.

image

Scroll down to the bottom of the features list and click on the Activate button for the Visio Shape Property Viewer Web Part feature.

image

Configuring the Visio Shape Property Viewer web part

Once this is activated it will appear as a web part from the Insert > Web Part action when editing pages.

image[28]

There is no configuration needed.  You simply add this web part to any web part zone on the same page that already contains a Visio Web Access web part and the Visio Shape Property Viewer web part will automatically display the Shape Data values and any hyperlinks that are defined on the selected shape in the displayed Visio diagram.

image[6]

Removal

Before removal you need to deactivate the feature on the site collection.

image

To remove the deployed solution you must run the following PowerShell commands:

1. First you need to uninstall the solution from the farm:

uninstall-spsolution visioshapepropertyviewer.wsp -webapplication http://mytestsrv/

Confirm
Are you sure you want to perform this action?
Performing operation "Uninstall-SPSolution" on Target
"visioshapepropertyviewer.wsp".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):a

2. Next you must remove the solution from the solution store:


remove-spsolution visioshapepropertyviewer.wsp

Confirm
Are you sure you want to perform this action?
Performing operation "Remove-SPSolution" on Target
"visioshapepropertyviewer.wsp".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):a
PS C:\Users\chhopkin\desktop>

At this point the feature has been deactivated and removed from the farm.

Attachment: VisioShapePropertyViewer-v1.zip
Leave a Comment
  • Please add 8 and 4 and type the answer here:
  • Post
  • Very nice Chris ... here are some comments:

    1. If the Shape Data row is linked to a text column marked as hyperlink, then the address, description is returned. Therefore your control hyperlink does not work because it does not remove the ", descrption" from the URL

    2. It is unfortunate that you cannot hide the invisible Shape Data and hyperlinks because too many rows are returned ... perhhaps you could enable a parameter string for the control in which you could enter a semi-colon separated list of the text of Shape Data labels or Hyperlinks that you do want to actually display

    3. Consider more parameters for the control to formatting, such as background and foreground colors

    4. It would be useful to be able to open the hyperlinks in a new page or tab

    5. Perhaps add an option for the viewer to be active OnMouseEnter instead of OnSelectionChanged

  • Unfortunately the webpart does not work if a query string (url) filter webpart is in the webpage. I use this filter for passing the URL of the visio webdrawing. Is there a workaround?

  • While adding it in a webpart it throws an error as "This type is not registered as safe"

    Please help.

Page 1 of 1 (3 items)