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 VisioVisio
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 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?Moving Phases/Separators in Visio Cross-Functional Flowcharts?
I use Visio Cross-Functional Flowcharts a lot, but there is one thing that really bugs me … you can move function bands\swimlanes around, but you can’t move the phases\separators in the same way. The phases/separators are containers just like the function bands\swimlanes, so why can’t I move them? Actually, it is quite understandable when you realise what is actually going on … both are contained within the Cross-Functional Flowchart (CFF) shape, but there are list containers between each band and the parent CFF shape.
[Read more…] about Moving Phases/Separators in Visio Cross-Functional Flowcharts?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 below from an earlier article can become a challenge. I have been using Notepad++ for many years to copy and paste the formulas from a cell so that I can split the text into multiple lines, and to see where the bracket pairs are. My good friend John Goldsmith pointed out that I can record a macro in Notepad++ and create a custom language style. So together we improved our environment for editing ShapeSheet formulas.
[Read more…] about Using Notepad++ to Edit Visio ShapeSheet formulas