« 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  

[UPDATE ON 2012-08-08] I decided to incorporate this tool into my Visio Power Tools Add-In. You canj download it here: http://visioautomation.codeplex.com/. The instructions below are still more-or-less correct, it's just that you'll be installing something called "Visio Power Tools" instead of "DemoStencilCatalog"

 

Summary: I wrote a tool that creates an HTML document shows the thumbnail preview images for all masters in a set of stencils.

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 I came up with the demo tool called “Stencil Catalog”.

STEP 1 DOWNLOAD AND INSTALL

First, get the DemoStencilCatalog.ZIP file here.

Extract the contents of ZIP file are run the Setup.EXE

STEP 2 RUN THE TOOL

The tool is a Visio Add-In, so you'll need to launch Visio 2010 first. One you start the Visio Application, click on the Add-Ins tab on the ribbon.

0062

 

The add in created a new group called StencilCatalog. Click on the Create Catalog button.

 

 0063

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.

 

0064

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 (6)

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

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
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>