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 TipsVBA
Linking 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 VisioA Visio List Shape is also a Container
Structured diagrams have been around in Microsoft Visio since 2010 and I have always known that list shapes are a specialized container shape, however it still came as a surprise to me recently that a list shape can simultaneously act as a container shape!
There are a few examples of both container and list shapes in the Microsoft provided content in all versions of Visio desktop, and even in the subscription Visio for web. The most popular of these is the Cross-Functional Flowchart template which contains container shapes (the Swimlane and Separator shapes) within list shapes (Swimlane List and Phase List), which are within another container shape (CFF Container).
In Visio desktop, the Insert / Diagram Parts / Container allows you to choose from a number of pre-built container shapes. There is no button to insert a list shape, but you can create your own or easily modify one of the pre-built ones to behave as a list shape.
[Read more…] about A Visio List Shape is also a Container