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 … check out the Microsoft Learn page about SETATREF(…), and view the video below to find out more.
[Read more…] about Synchronizing Visio Shape Fill Color (or almost any cell) across pagesShapeSheet
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.
[Read more…] about Positioning Visio Shape Text Block with a Control HandleUnderstanding 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 to. My assumption had been that a segment of a path is always between vertices in a geometry section, but this is not the case. So, I thought I would look deeper into the ShapeSheet functions of paths and segments. The following screenshots show a series of ShapeSheet formulas and the result of them on a single line that has 4 vertices that can be moved using a yellow control that they are bound to. Notice how the PATHLENGTH(…) formula fails to understand the segment parameter until the vertices are moved.
In case the screenshots are a little dry, I have recorded a short video to explain further.
My own need was for a boundary shape around some other shapes where I wanted to make the segments disappear if they were outside of the Visio page. The unexpected #REF! values were causing distortions because the co-ordinates were failing to update.
However, I can see that this understanding of line segments and points will be useful in many types of diagrams.
For completeness, I thought I would try the same exercise with a PolyLineTo row rather than multiple LineTo rows.
The PolyLineTo formula does have the advantage of being a single row, but this means that the PATHLENGTH(…) function does not have a segment index to that can be used to calculate with. In fact a PolyLineTo row does have two segments, but the last one is always 0 length!
However, I was able to calculate the lengths of each segment in both cases, by using the co-ordinates of the Controls in the Tip cell for each Controls row with the SQRT(…) and POW(…) functions..
Related articles
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…)
Custom Color Themes in Visio?
I was recently looking into custom color themes for corporate branding in desktop Microsoft Visio and became re-aware how different Visio still is from the rest of the Microsoft Office applications. A Visio page or document does not need to have any theme applied, but the documents of the other Office applications always have a…
When is a Visio Callout not a Callout?
I have been a Visio user/developer since the mid-1990’s and seen the word “callout” used as part of the name of many master shapes in Visio. The images below show five ways that the term “callout” has been applied to the name of Visio master shapes. Generally, each evolution has been an advance on the…
Using Visio Color by Value on Connectors
Data Graphics in Visio Plan 2 and Visio Professional is great, but it only enables us to use them with 2D shapes in Visio, i.e. not on connectors. So, what if you want to change the line colour of the connectors between the 2D shapes because of the data flowing between them? Well, it is…
Using Notepad++ to Edit Visio ShapeSheet formulas
Visio shapes get their smartness from the formulas that are entered into the ShapeSheet, but editing these formulas can be extremely tricky and prone to error because of the lack of a modern programmer’s interface. Formulas can be quite long (up to 64k characters) but even medium size ones like the one in User.GetWorkdays cell…
Understanding Visio Data Graphic’s Color by Value
The desktop Visio editions, Visio Professional and Visio Plan 2, have a great way of automatically displaying data as Data Bars, Icon Sets, Text Callouts and Color by Value. The first three types of Data Graphics require sub-shapes to be inserted into each shape that they are applied to, but the last one, Color by Value (CBV), merely requires some User-defined Cells and formulas. However, unlike the first three, there can be only one Shape Data value displayed as colours in each Data Graphic (DG). So, how can we easily update the colour assigned to each value using code, rather than manually using the manual dialogs provided?
[Read more…] about Understanding Visio Data Graphic’s Color by ValueSetting Theme defaults in Visio
I was recently asked how to change the default font size and line weight in Visio, and then saw then many others are asking the same sort of question. I found one reasonable answer suggesting that you should create a new document from your required template, then edit the Styles to suit, and then save as a new personal template. Well, I am not sure I like that answer because it means you must create a duplicate template for each one you use. So, I decided to see if I could find a better way…
Firstly, it is important to know that these default settings are not editable for the whole Visio application, because they are stored in each document, under the Styles collection. You can view the Styles in a document using the Drawing Explorer window that can be opened from the Developer tab.
[Read more…] about Setting Theme defaults in VisioMaking Custom Shapes for Visio for M365
I recently revised my chess and checkerboard Visio documents to work in Visio for the Web (Visio Plan 1), but now that Microsoft are providing a version of Visio free to M365 business users, I need to make some further adjustment to get them to work for these users who do not have a Visio Plan 1 or Plan 2 license. The problem is that Microsoft restricts the capabilities of the free version by white-listing Visio masters. So, the answer is to delete the masters … then the Visio document becomes editable in Visio for M365!
So, what is the downside?
[Read more…] about Making Custom Shapes for Visio for M365