I am often asked what makes Visio unique and makes it stand out from the crowd, especially in today’s online world. Well, I think there are many reasons, but one of them is the ability to create scaled drawings with parametric components of specific dimensions. This was crucial for my adoption of Visio back in 1996 (see Chase Manhattan Bank – bVisual ), and since then I have created hundreds of dimensionally accurate catalogue components for use in scaled drawings for multiple manufacturers. Over the years, I have developed some patterns in ShapeSheet formulas that I re-use consistently. In this article I show the pattern that I use to provide a user with specific width and height dimensions that can be selected in any of three ways:
- Manual resize of the shape with the shape handles to only the specified sizes
- Selecting a dimension from the Shape Data panel
- Selecting a dimension from the right-mouse Actions context menu
All of these options are linked together so that editing the list of specific sizes are easy to maintain.
All of this is made possible by the ShapeSheet in Visio, which can be programmed using any Visio for the desktop edition, but can be used by Visio for the Web users.
So, how does this work? In the screenshot below you can see that User-defined Cells, Shape Data and Actions sections have been inserted, and then linked together with formulas.

Firstly, the Fixed List (1) type Width and Height Shape Data rows have been inserted with the semi-colon separated choice of specific dimensions in the Format cell.
The Value cells are redirecting their values to the Width and Height cells using the SETATREF(…) function. This means that these values can be set either with the Shape Data panel or with the shape handles. However, the shape handles will allow any size to be selected unless this is restricted with a BOUND(…) function, such as :
=BOUND(1800 mm,0,
FALSE,INDEX(0,Prop.Width.Format),INDEX(0,Prop.Width.Format),
FALSE,INDEX(1,Prop.Width.Format),INDEX(1,Prop.Width.Format),
FALSE,INDEX(2,Prop.Width.Format),INDEX(2,Prop.Width.Format),
FALSE,INDEX(3,Prop.Width.Format),INDEX(3,Prop.Width.Format)
)The above formula restricts the Width to one of four values that are specified in the Format cell of the Width Shape Data row (Prop.Width.Format).
The User-defined Cells simply calculate the Index of the selected Width and Height values using the LOOKUP(…) function. These values are used in the Actions row to provide a Checked value, and in many actual solutions, often used to provide part numbers for bills of materials.
Each of the Action cells the Actions rows use the SETF(…) function to re-apply the BOUND(…) formula to either the Width or the Height cell, with a specific INDEX value:
=SETF(GetRef(Width),
"=BOUND(INDEX(0,Prop.Width.Format),0,FALSE,INDEX(0,Prop.Width.Format),INDEX(0,Prop.Width.Format),FALSE,INDEX(1,Prop.Width.Format),INDEX(1,Prop.Width.Format),FALSE,INDEX(2,Prop.Width.Format),INDEX(2,Prop.Width.Format),FALSE,INDEX(3,Prop.Width.Format),INDEX(3,Prop.Width.Format))")The Menu text of the Actions rows are read directly from the Shape Data rows so that maintenance is easy, and a check mark is displayed for each selected row with the formula in the Checked cell.
Note: I would like to have provided such a small number of menu choices directly without using the FlyOutChild = TRUE in order to reduce the menu clicks for a user, but Visio for the Web currently does not display this alternative correctly, as shown below, where the web view is on the left, and the desktop view is on the right:


I have reported this to Microsoft ….
The sample diagram is available here and a video here:
Related Articles
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…
How 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…
Jumping between Shapes in Visio
Many Visio diagrams get quite large, and sometimes it is useful to provide the ability to jump to another shape quickly in the same document, either on a different page or on the same one. Although there is an add-on provided in desktop Visio that is used by the Off-Page Reference shape provided in the…
Smart Radio Buttons and Check Boxes in Visio
A recent project requires an interactive tutorial within Microsoft Visio desktop where a lot of the questions need a single answer using radio buttons, or multiple-choice answers using check boxes. I thought that this would be a great use of the list containers capability because the questions and answers could be part of the container…
Using Button Face Ids in Visio
Microsoft Visio desktop has the ability to display icons from a built-in list of Office icons on Actions and Action Tags (nee Smart Tags). These can be set in the ShapeSheet by using the desired number from several thousand in the ButtonFace cell. Although there is the ability to add better icons using code, the…
Grid Snapping Revisited
I have previously tackled the subject of snapping to grids in Visio desktop (see https://bvisual.net/2018/06/19/really-snapping-to-grids-in-visio/ ) but a recent project required me to improve the example because it did not respond to all cursor arrow keys. The problem was that the previous solution could not understand which arrow key had been clicked, therefore it did…









Leave a Reply
You must be logged in to post a comment.