Visio desktop has multiple ways to specify the folder where docked stencils can be found, but, as far as I am aware, Visio for the Web only has one. I mostly create VSTO add-ins for Visio desktop, and I use Visio desktop as a studio for creating templates for Visio for the Web. Often, I leave the Document Stencil in the template open because users can then drag and drop from there, but when I create an installation with custom stencils then they normally go into the application folder, or a sub-folder of it. An alternative is to install them into the My Shapes folder in the users desktop Documents folder. These will appear in the Visio desktop UI. Also, there is the ability to set the Stencils folder using File | Options | Advanced | File Locations. Finally, the desktop edition will always first check the folder that the Visio document is in for any docked stencils. Visio for the Web does not have all these options, so how do you get any custom docked stencils to appear when you use Visio for the Web to edit a document?
[Read more…] about Docked Stencils in Visio for the WebVisio
My Visio Books and Old pre-C# Work
We, as a family, are in the process of de-cluttering our house for hopefully a move closer to the south coast, so I decided to take a photo of my Visio books collection, and as you can see, back in the mid-1990’s, I started reading and learning from other peoples works, and then progressed to writing my own from 2007. This shows how mature the Visio desktop product is, and as very little has been removed, then each book has something to learn.

Creating Boolean Context Menus in Visio
Over the many, many years that I have been creating Microsoft Visio solutions, I have had to create numerous right-mouse context menus for shapes to control their Shape Data values. Over that time, patterns emerge, so this article is highlighting three different appearances for simple Boolean values, otherwise known as True/False or Yes/No values, and even for tristate Yes/No/Maybe. In fact, Visio presents you with Boolean as one of the eight types of data available on the Define Shape Data dialog, but there is no UI for creating accompanying right-mouse context menus except for the ShapeSheet window. However, I will show that using a Fixed List type is often preferable to a simple Boolean type.

A visual exploration of Penrose Tiling in Visio
Maybe it is because I used to be a building architect, but I have always been fascinated by the relationship between numbers and visualisations. Perhaps the most famous one is the Golden Ratio which has been used as the basis of many building designs and art pieces. It is often recognised to create a harmony that is universally understood, and is repeatedly found in nature, yet it all boils down to a simple ratio of about 1.618 … and is related to the Fibonacci Numbers. Roger Penrose (re-)discovered shapes based on the Golden Ratio can be arranged aperiodically on an infinite canvas without a repeating pattern. These Penrose Tiling shapes were developed into two groups (P2 and P3) each with two shapes.
There are rules about the arrangement to ensure that they do not fall into a repeatable series. These rules can be followed by ensuring that the ends of the arcs within each shape meet each other. The shapes can be used to try to create an aperiodic pattern of an infinite size, and then a timer can randomly change the colours. It’s a little festive fun!
[Read more…] about A visual exploration of Penrose Tiling in VisioHow SVG in Visio can cause a Shape.BoundingBox(…) error
I have used Visio’s Shape.BoundingBox(…) for many, many years and I cannot ever recall it failing, but I have now managed to create some shapes that cause it to error. This caused many hours of confusion, so I nearly abandoned using the method, until I discussed it with my fellow Visio MVP, John Goldsmith (see VisualSignals), and together we examined the cause. It came down to a badly formed sub-shape within the shape that had zero dimension … and in fact had an incomplete ShapeSheet. If you look at the screenshot below, then you may notice that there is no Shape Transform section! That is a mandatory section, and should always exist … so how did this happen?

Post-Processing Paste from Clipboard in Visio
One of my current Visio VSTO add-in projects requires me to react to users pasting custom shapes in the Visio page from the clipboard. The process involves registering the ExitScope event and then checking the Clipboard contents. Initially, I was merely testing for a line in the DataObject that started with the word “Visio “, but then testing revealed that copying and pasting text from one shape to another was also getting processed, so then I added a further check that the line also finished with the word ” Shapes”. This works fine, but then I got to wonder if I could also post-process tables copied and pasted from Excel because the standard paste maintains font settings but omits the tabs and line feeds, making the text unusable without serious manual editing. This article explains how this can done.









