There are literally thousands of master shapes in the stencils supplied with Microsoft Visio, so I guess that mistakes can creep in. One error that I have noticed is the inability of the default text control handle of many of the network shapes to actually move the text block horizontally.[Read more…] about Correcting the Text Control Handle on Visio Network Shapes
Using a formula for Shape Data labels prevents multiple updates
I have only been developing Visio solutions for 25 years, but I got a surprise this week when I was trying to understand why I couldn’t update the value of a Shape Data row of multiple selected shapes. It is something that I often do, so it took me a while to understand why I was failing to change the values, even though it appeared to initially change in the Shape Data window. There was no problem selecting the shapes individually, but every time I selected multiple shapes and edited these particular rows, I could see the new value in the Shape Data window, but as soon as I looked at the individual shapes, I could see that the values never got changed. I checked my code in vain, and ran the Events Monitor from the Visio SDK. Visio seemed to enter the Shape Data scope, but then immediately exited it without attempting to apply the new value to the shapes. Very strange![Read more…] about Using a formula for Shape Data labels prevents multiple updates
Have multiple alternate languages in the same Visio diagram
I wrote a Visio add-in a few years ago that provides the ability to switch a multi-page Visio diagram between alternative languages. This particular client had just under a hundred pages of process flowcharts, with hyperlinks between the pages. They had to produce this Visio document in seven different languages and got extremely fed-up with trying to synchronise all the different copies whenever any changes were made, so a single Visio document which can store all of the alterative shape texts and page names was a much simpler time saving-solution. Moreover, Microsoft provide an online cognitive service which is useful for automatic speedy translations, though these can be overridden by a more knowledgeable user.
However, since this add-in was written, Microsoft have changed this translation service, and Visio has introduced 64bit version as the default. Therefore, I have updated the Multi-Language Text for Visio add-in to support both of these, and taken the opportunity to change the installation and licensing system.[Read more…] about Have multiple alternate languages in the same Visio diagram
Spotting Custom UI Errors in Visio Add-ins
I have written many COM and VSTO add-ins for Visio, but got confused when a client recently reported that the following Custom UI Runtime Error was appearing. I wasn’t getting the same error on any of my test laptops, so I chatted with my good friend, and fellow Visio MVP, John Goldsmith ( John Goldsmith’s visLog (typepad.co.uk) ). He gave me an excellent tip….[Read more…] about Spotting Custom UI Errors in Visio Add-ins
Automatically displaying Visio shape text in other shapes
There are times, in Visio, when you just need to ensure that the text in a primary shape is synchronised with the text in different secondary shapes … even if they are on different pages of a Visio document. My previous article, Forcing Display Update of Inherited Data Values , describes a method of synchronising the values in Shape Data rows from a central data source in the document, and that allows for the values to be viewed and edited in multiple pages or shapes. However, the text of a Visio shape is different because it is not stored in a single ShapeSheet cell, so how can you display the text of one shape in another?[Read more…] about Automatically displaying Visio shape text in other shapes
Forcing Display Update of Inherited Data Values
I was going to title this “When is a truth not a truth?” because I have found that Visio can sometimes refuse to apparently update the displayed value in a cell, even though it has been changed. However, this was, in this instance, down to a misunderstanding of the formula evaluation events on my part. Take the scenario where you have some data that you want to be available to all pages and all shapes in the Visio document. There are some built-in Document Properties in Visio that are accessible to all pages and shapes using ShapeSheet functions ( eg TITLE(), SUBJECT(), COMPANY(), Categories / CATEGORY(), Tags / KEYWORDS(), Comments / DESCRIPTION(), Author / CREATOR(), MANAGER() and HYPERLINKBASE()). However, Visio does not have custom Document Properties like the other Office applications. Instead, Visio allows for the addition of User-Defined Cells and Shape Data rows in the DocumentSheet of the document. These can be uniquely named, and Shape Data rows can be given a data type (of sorts), a label, prompt and format.
These values can be accessed via a ShapeSheet function from anywhere within the document, which ensures that you only have one version of the truth. However, there is no non-developer user-interface to edit these DocumentSheet Shape Data values in Visio, so what do you do? And how can you be sure that you are always seeing these centralised values correctly?
I created the following master shape to test how this can be done. It is a group shape that contains a single StartDate Shape Data row, which is used to edit or view the date in the similarly named Shape Data row in the DocumentSheet. For good measure, I also added a similarly named Shape Data row to the page, so the Shape Data window in the page could also be used. I then used Insert / Field to display the values in the ShapeSheet, PageSheet and DocumentSheet:[Read more…] about Forcing Display Update of Inherited Data Values