All of my Visio solutions contain custom masters because this is the best way to create smart shapes that respond to user’s needs. This usually means creating Shape Data, User-defined Cells and Action rows that govern aspects of the shape with formulas designed to provide an efficient user interface. As a developer I sometimes forget that other users may not perform the same actions as I do, and can accidently undo all my intended behaviour. For example, in recent testing of a visual stream mapping system that I am working on, my carefully constructed master-shape relationship was being broken by grouping some of them together, thus changing their behavior and hiding them from some of the custom functions. The reason given was to that they want to create copies and this seemed like a reasonable way to do it. Now, I have known that this is bad ever since my original Visio developer training back in 1996, so I always avoid doing this, and erroneously thought that other would know this too. I was wrong to be so myopic, so I explored how I can best prevent this and other user actions that could break the intended master-shape relationship.
[Read more…] about Protecting the integrity of custom Visio mastersC#
Migrating from Lucidchart to Visio?
My fellow Visio MVP, Michel Laplane, and I recently converted and transformed 15k Lucidchart documents to Microsoft Visio for a large multi-national organization. This was approximately 4 years after they had moved from Visio to Lucidchart! I do not know the full reason behind these changes in technology, and I do not have a particular dislike of Lucidchart, but my passion is Visio, so I was willing to assist SohoDragon in this migration for their client. The Lucidchart application is solely a web-based diagramming system with the documents stored in AWS, so perhaps it does not fit easily within the corporate compliance architecture of Microsoft Azure, Teams and SharePoint. Microsoft Visio though has the same files for both the desktop and web editions, although there are some restrictions in the size and features of editing Visio document in the web. However, all the M365 users will have the ability to view and comment of the Visio documents that they have permission for. Visio Plan 1 or Plan 2 subscriptions will be required for editing the migrated documents because they have not been created with the templates provided in Visio for M365, and Visio documents which have any page with over a thousand shapes will currently only be editable in the Visio desktop edition. The Lucidchart documents needed to be audited, exported and transformed into Visio documents, and then uploaded to similar folders in SharePoint, where user permissions could be applied. We decided to use multiple secure Windows VMs to process the documents and then upload them to SharePoint before the VMs were deleted.

How SVG in Visio can cause a Shape.BoundingBox(…) error
I have used Visio’s Shape.BoundingBox(…) for many, many years and I cannot ever recall it failing, but I have now managed to create some shapes that cause it to error. This caused many hours of confusion, so I nearly abandoned using the method, until I discussed it with my fellow Visio MVP, John Goldsmith (see VisualSignals), and together we examined the cause. It came down to a badly formed sub-shape within the shape that had zero dimension … and in fact had an incomplete ShapeSheet. If you look at the screenshot below, then you may notice that there is no Shape Transform section! That is a mandatory section, and should always exist … so how did this happen?

Linking Data to Visio Shapes in Code
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!

Viewing Visio Document Changes in Git
Developing a Visio solution usually involves both .Net code and Visio ShapeSheet formulas. Good practice dictates that the source code is saved into a code repository, such as Git, where changes can be committed and commented. Visual Studio 2019 now includes native Git support, and can be linked to Azure DevOps easily. The code can be viewed by others and the changes made by commits can be reviewed. This is tried and tested for the .Net code, but any changes made to a Visio template, stencil or drawing document is a black box. If the Visio document is included in the Git project, then all that is visible is the fact that the file has been changed, but the detail of the actual changes are unknown. There may be some comments with the commit, but that is not a precise definition. So, what if there was a way to easily spot the changes?
[Read more…] about Viewing Visio Document Changes in GitGetting the Microsoft Office Theme Value
I am working on a Visio VSTO project where I need to synchronise a UI element with the current session Microsoft Office Theme. At first, I thought that there would be some way of getting a value from the Visio object model, but I was wrong…
The Office Theme can be selected from either the Visio Options, or the Account Options panels.
[Read more…] about Getting the Microsoft Office Theme Value






