Site icon bVisual

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!

An examination of the ShapeSheet formulas also showed that there was no dependencies or precedents either …. Then I noticed that I was using a formula to display the Label text, rather than just a simple string. A quick edit proved that this was the surprising problem. It doesn’t matter if the formula is something as simple as the following in the Label cell (this wasn’t the actual example but this demonstrates the issue):

="Status" & "*" 

It will fail, but editing back to the following makes it work again:

="Status"

Who knew? Certainly not me 🙁

https://bvisual.net/wp-content/uploads/2021/11/FailedUpdate.mp4
Failing to update the values
https://bvisual.net/wp-content/uploads/2021/11/SuccessfulUpdate.mp4
Successful updating after replacing the formula with just text

When is a Visio Callout not a Callout?

I have been a Visio user/developer since the mid-1990’s and seen the word “callout” used as part of the name of many master shapes in Visio. The images below show five ways that the term “callout” has been applied to the name of Visio master shapes. Generally, each evolution has been an advance on the…

Using 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…

More Parsing XML Data in Visio Shapes

My last article looked at parsing an XML string with a known structure and order of elements and attributes. This can be acceptable in some scenarios, but what if the elements or attributes are in a different order? Then it is necessary to use the element and attribute names rather than their index position. This…

Highlighting dirty text in Visio shapes

I suppose I should explain what I mean by dirty text first 🙂 I often display the value of a Shape Data row in Visio text, but sometimes the solution requires that the value is also editable. This is ok if the client accepts that all editing is done with the Shape Data window or…

Interactive Demographics of the European Union in Visio

I was recently contacted by a reader, Stanley M. Max (Towson University lecturer), who had started creating a Visio map of the 27 countries in the European Union in 2020, along with the demographics culled from Wikipedia. He wanted to know if the map and stats could be combined to make a more appealing presentation.…

Pushing Data Visualizer in Visio beyond its limits

My last post was about some of the lessons learnt when trying to push Data Visualizer to its limits, but this one has some ways of overcoming these limitations. The main lesson learnt is that DV binds the shapes within the DV container shape, CFF Data Visualizer, and controls some of the ShapeSheet cells that…

Exit mobile version