Microsoft Visio desktop Plan 2 and Professional editions provides the ability to create and synchronize cross-functional flowcharts between the diagram and an Excel table. This is great, and widely used for many types of processes. The Excel table normally has a Function / Swimlane column that contains text that becomes labels on the swimlane containers, and a Phase / Timeline column that contains text that becomes the label of the phase or separator containers. The import provides the option to order the diagram by Function and/or Phase, but it is impossible to get them ordered by both! This article provides a solution using a free macro-enabled Visio stencil.
[Read more…] about Optimize Visio Flowcharts: Swimlane Reordering TipsCoding
Refreshing the cached installed files of Visio
I have created many Visio solutions over the past 25 years and used a number of methods of creating an installation that includes Visio templates and stencils. I have just wasted many hours trying to debug an installation created with Advanced Installer until I realised that the problem was that Visio was not properly updating the cache of installed templates and stencils. In the end, the answer was to delete the cache and let Visio re-create it. The screenshots below show the custom shapes opened with the custom template and the More Shapes context menu. Before I deleted the cache, Visio incorrectly displayed the file name of some of the stencils (those with a trailing “_M” ) rather than the display name as entered into the PublishComponent table in Advanced Installer. In addition, the context menu did not show those stencils as being present in the workspace.
[Read more…] about Refreshing the cached installed files of VisioLinking Data to Shapes in Visio after using Data Visualizer
Data Visualizer (DV) in Visio Plan 2 (Data | Create from Data | Create ) is great because it provides a way of automatically creating a diagram from data, but it also prevents some of the other data-linking features in Visio from being used. This is because DV wants to take control of the data in the shapes to provide refreshes from the data source or send updates to the data source. This can be very annoying if you use DV to create the initial layout, then you enhance this, so it looks just perfect, and then you just want to update some of the data without affecting the layout. DV may re-layout your carefully crafted diagram, even if there are no updates to the data that should do that. Also, you may want to integrate data from other sources that were not available or accessible to the table or query used for by Data Visualizer. This is when you may want to use Data | External Data | Custom Import which also provides a much greater number of data source types. In this article, you will learn how you can do this manually, or automate it with the help of a little VBA code (or similar).
In this example, I have used table of personnel that I have used before, but added an extra column, Shape Type, that simply has the value Rectangle, which is simply the name of a simple Master shape that I have added to my macro-enabled stencil, ExDataLinker.vssm.
[Read more…] about Linking Data to Shapes in Visio after using Data VisualizerNew 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 VisioUsing 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 possible … with a little preparation!
[Read more…] about Using Visio Color by Value on ConnectorsCounting glued and connected shapes in Visio
I got a surprise in one of my projects when I counted the shapes glued together using the Shape.GluedShapes(…) method … the sum of the filtered glued shapes just didn’t add up to the unfiltered count. So, I thought I should check the Shape.ConnectedShapes(…) method too … and there is a scenario where that has a similar result.
In the following diagram, I have different coloured squares with connection points of different types at the centre of each edge (as denoted by the connection type numbers), and one under a control point in the bottom left corner. I have glued the ends of coloured connector lines, statically (Red and Black) and dynamically (Green), and glued the Purple Square directly to the Orange Square. The Blue Square shape is glued to a connection point on the green dynamic connector.
I then ran some code to get the count of glued and connected shapes … and noticed some apparent discrepancies…
[Read more…] about Counting glued and connected shapes in Visio