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 pagesbVisual Blog by David Parker
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 HandleNew Requirement for VBA Digital Signatures in Visio
Like most developers, I have to buy a new digital certificate every 3 years to sign my Visio add-ins and VBA projects. Usually that means verifying my bone fides, paying the fee and downloading the certificate, but security has been increased, and now, like everyone else, I have to use a USB key with it on (see Code signing changes in 2023 (digicert.com)). This requires the use of an application such as one from SafeNet that enables the signing of code. This is working for my Visio addins written with Visual Studio, but the VBA macros appeared to be signing until I tried to save the document. I was unable to save the document with the certificate applied:
[Read more…] about New Requirement for VBA Digital Signatures in VisioUnderstanding 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…
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 theme. This means that custom theme colors are not available in Visio until a theme is selected, because custom theme colors rare a variation of a theme. This should not be necessary all the time, so I tried to produce a way of having an approved swatch of colours in a document, from which the individual colors can be copied.
[Read more…] about Custom Color Themes in Visio?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 previous ones, or have becoome specialised for their usage … until Microsoft made “callout” shapes available in Visio web editions. These are not an advance in evolution, but are a radical regression, and in my opinion, quite unnecessarily basic, and extremely frustrating.
[Read more…] about When is a Visio Callout not a Callout?