Anyone who develops with Visio faces the problem of viewing the formulas and values in an often difficult to navigate ShapeSheet window. I have been a SnagIt and Camtasia user for many years thanks to the generous free license I get from TechSmith as a Microsoft MVP. I have used both products extensively for my books, articles and videos, though I am not an expert in either product. Now, SnagIt has a panoramic scrolling capture feature that is great with ShapeSheets.
The unique smartness of Visio shapes comes from the ability to program the ShapeSheet behind every single shape. This is like an Excel worksheet divided into sections, and the display can switched between formulas and values. The Visio’s ShapeSheet window does have the ability to toggle the visibility of each section, but that is often not enough to get a complete picture of the formulas involved. The following example is the partial view of the ShapeSheet window for a simple shape.
ShapeSheet Formulas
Anchoring scaled shapes to page corners in Visio
I have read that other users have bemoaned the lack of a anchor to top left, or something similar in Visio, so I thought I would demonstrate the issue, then propose a solution. In particular, there are some master shapes on the Annotations and Title Blocks stencils in the Visio Extras category that you would expect to have this capability, but don’t. Wouldn’t it be useful to have the ability to keep the shape size and anchor position to page bottom left, bottom right, top right or top left? This would mean that the page size or scale could be changed, but the annotations and title blocks could remain anchored.
First, it is important to know that Visio shapes are anchored, by default, to the bottom left of a page (or the shape that they are inside the group of). These values are returned from the formulas in the PinX and PinY cells.
Secondly, the location of the pin within the shape is defined by the formulas in the LocPinX and LocPinY cells, and these are relative to the bottom left corner of the shape.
Then it is just a matter of adding some Actions rows to the ShapeSheet of each master in the Document Stencil. The principle is to utilise the User.AntiScale value to reset the formulas in the Width, Height, PinX or PinY cells. The User.AntiScale row exists in many Master shapes because it is useful for de-scaling values. It has the formula:
Switching Metric and US Units in Visio floor plans
I recently wrote an article comparing Metric and US Units in Visio for floor plans (see Metric vs US Units in Visio floor plans). The intention was always to create right mouse actions on a Visio floor plan border shape to provide many alternative page sizes and scales. I have now done this, with the help of Excel and LinqPad.
The action formulas in the ShapeSheet all create multiple SETF(..) formulas that emulate the actions performed by the multiple tabs in the Page Setup dialog, but simplified into a single action:
Understanding Visio’s Color Formulas
I was recently exploring the ShapeSheet formulas available in Visio that affect colors, and I decided that I needed to make a shape that I can change the fill color, tint, shade and tone of dynamically. This allows me to copy the formulas from a Shape Data row value for pasting into a ShapeSheet cell.
[Read more…] about Understanding Visio’s Color FormulasMore secrets of the Visio Legend shape
I was going to do a full post on the special Legend shape in Visio that can automatically count instances of masters on a page, then I found that my good friend Chris Roth, aka VisGuy, had done one some years ago ( see visguy.com/…/legend-shapes). However, I have some extra information that will assist in getting the functionality to work consistently.
Basically, you can make any Master work with the Legend shape by adding the User.visLegendShape = 2 setting into a Master shape, but there are caveats.
- If the name of a Master is changed, then any existing shapes on the page must be re-placed
- The BaseID of each Master must be unique
- If the BaseID is changed (using NewBaseID), then any existing shapes on the page must be re-placed
To demonstrate this, I used the Good and Bad icon shapes from the Legend Shapes stencil.
[Read more…] about More secrets of the Visio Legend shapeA Blackstar alphabet in Visio
I wrote an article last year for Microsoft, using Visio to explain some bits of messaging and encryption (see Musings on MVP Open Day 2016 at Bletchley Park.pdf ). I finished the article with an unexplained image of a word, well the solution was obviously “BOWIE”, as written on the cover of his final album, Blackstar, released exactly one year ago today.
[Read more…] about A Blackstar alphabet in Visio