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 Connectors
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
One of the most useful capabilities of Visio Professional and Visio Plan 2 is to link external data to shapes and have them refreshed by changes in the data source. So, many of my solutions involve writing code to make these links, and they are covered with some VBA examples in my book, Mastering Data Visualization with Microsoft Visio Professional 2016, but I mostly write C# code in VSTO add-ins, so I thought it would be useful to demonstrate how easy it is to create data links by dropping a shape, and by adding links to an existing shape. The book, by the way, is still relevant for the current Visio Professional and Visio Plan 2 editions![Read more…] about Linking Data to Visio Shapes in Code
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
I was recently asked about switching between different Visio Data Graphics within a page, so I thought I should record a few short videos to explain how Visio Data Graphics work, how they can be edited and duplicated, and how to automate switching between them.[Read more…] about Duplicating Visio Data Graphics
I wrote a post a few years ago entitled How to Run VBA Macros from a Ribbon Button in Visio 2010, and was recently asked how to add the custom buttons to an existing tab. Well, it got me thinking that I don’t really like having any VBA code in my Visio diagram documents, so I thought I would explain how all the code can be in a macro-enabled stencil so that it can be used with many different diagram documents. It turned out to be a very easy modification….[Read more…] about Adding Macro Ribbon Buttons to Visio Documents from a Stencil