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
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…
Synchronizing Visio Shape Fill Color (or almost any cell) across pages
I was recently asked how the color of one shape can be changed and for other shapes to be automatically updated to the same color … even if they are on different pages! Well, it is possible with Microsoft Visio’s awesome ShapeSheet formulas. In fact, this capability is not limited to the FillForegnd cell ……
Positioning Visio Shape Text Block with a Control Handle
I was recently asked how a control handle can be added to a Visio shape so that it can be used to re-position the text block. Fortunately, it is extremely easy to setup, and requires just two formulas to be updated in the ShapeSheet. This is a great use of the SETATREF(…) function. (more…)
Understanding Segments of Visio Geometry
I recently had to revise my understanding of the POINTALONGPATH(…) function in Visio because I was getting a #REF! error in some cases. My particular scenario requires a line with a number of vertices that are initially all in a straight line but can be moved by dragging controls around that each vertex is bound…
Leave a Reply