« A Typographic Film Celebrating Futura | Main | Improvements to Windows 8 Screen Captures with PRINT SCREEN »
Saturday
Mar102012

Browsing Visio 2010 Stencil Shapes as a Document  

This question: “How do I browse all shapes in Visio (2010)“ on the SuperUser site inspired me. A couple of times recently I wanted to have a document available that showed me all the shapes in a stencil instead of having to manually load each stencil in Visio. I little bit of research and added this as a feature of Visio Power Tools 2010 (download here) is the ability to create an HTML document that contains thumbnails of all the Masters in a Visio Stencil.

PROTIP: If you want the pre-built HTML catalog files intead of having to run the tool, you can download the HTML files here: http://1drv.ms/1dM6bPX

Once you've in the Visio Power Tools, click on Power Tools > Create Stencil Catalog.

Snap00222

 

The Create Catalog dialog will launch. The overall process is simple. Enter a folder that contains some VSS files. Then enter the name of the folder where you would like the output HTML created. Then click Create catalog.

Snap00223 

 

In this example I've placed some VSS files in a folder called d:\stencils

0065

and I've created an empty folder called d:\output

0066

So enter those to locations in the dialog and press Create Catalog.

0067

As it processes the stencils, log messages will be written to the dialog.

0068

And when it is done, you'll see the catalog created in the output folder.

0069

Open Catalog.htm to see what it created.

 

0071

 

For each master, you'll see the name, the icon as shown in the stencil window, and the preview of the shape.

 

NOTES

  • Can this tool be made to NOT require Visio 2010? No. The only way this can work is via some Visio APIs that it has to call.
  • Why is this tool an Add-In instead of standalone tool? The APIs the tool uses require it to be hosted as an Add-In. The APIs don't work if the tool is a separate EXE.
  • Where are all the Visio 2010 stencils located? Ususally here: C:\Program Files (x86)\Microsoft Office\Office14\Visio Content\1033
  • Can I get the source code? Yes, of course. It's checked into the source code repository here: http://visioautomation.codeplex.com/
  • Can this tool work in Visio 2007? The tool requires Visio 2010, but the fundamental code could easily made to work on Visio 2007. I'll leave that as an exercise for the reader.

 

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (9)

Tried to install this add-in but got the following error message:

Name: DemoStencilCatalog
From: file:///C:/Users/user/Downloads/DemoStencilCatalog/DemoStencilCatalog/DemoStencilCatalog.vsto

************** Exception Text **************
System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for DemoStencilCatalog or its location is not trusted. Contact your administrator for further assistance.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
The Zone of the assembly that failed was:
MyComputer

August 7, 2012 | Unregistered Commenterxian

@Xian - sorry for the trouble this is my fault as the code was signed with a certificate that expired. I will have to upload a new version of this tool with a certificate that doesn't expire for a long time (10 years or so). By the weekend I will take care of this.

August 7, 2012 | Registered Commentersaveenr

@Xian - instead of updating this tool I have decided to incorporate it into my Add-in called Visio Power Tools 2010. You can download it from here: http://visioautomation.codeplex.com/

August 8, 2012 | Registered Commentersaveenr

Downloaded Visio Power Tools 2010 on 8/9/12 and created a catalogue from the "Power Tools" tab.

Small bug, looks like the first letter of each directory is being cutoff for "src=" in Catalog.htm:

img src="DO_M\icons\Domain.png" vs. img src="ADO_M\icons\Domain.png"
img src="DO_M\pictures\Domain.png" vs. img src="ADO_M\pictures\Domain.png"

August 9, 2012 | Unregistered Commenterthebogdan

@thebogdan - thanks for letting me know. I'll fix it a couple of hours.

August 9, 2012 | Registered Commentersaveenr

@thebogdan - the bug has been fixed and the latest version uploaded. Thanks for catching this and bringing it to my attention.

August 10, 2012 | Registered Commentersaveenr

Are you going to update this for visio 2013 ? I can confirm it doesnt currently work

February 1, 2014 | Unregistered Commenter2013

In response to the last comment - I've uploaded a newer version which works with the VSSX files used by Visio 2013

March 11, 2014 | Registered Commentersaveenr

Hi,
I downloaded Visio Power Tools 2010 from the link in your post, but when I tried installing them I got an error message like the one Xian received. Did the certificate expire or I'm using an old version of the installation?

Thank you!

December 10, 2014 | Unregistered CommenterSiff

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>