Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

Using NimbleText with Visio

John Goldsmith's profile image

John Goldsmith

30 April 2014
  • ShapeSheet

Using_NimbleText_with_Visio

Visio formulae can get quite complex and you can sometimes find yourself writing long strings across multiple shapes to achieve a particular outcome. I thought I’d jot down a quick post about one helpful tool, which I came across via Scott Hanselman’s annual(ish) tools list, called NimbleText.

NimbleText is a free tool that allows you to parse and manipluate text and is a great help for getting your strings into a Visio consumable state.

50 States

Here’s an example – suppose you want to get a list of US States and combine them so you get a state name / color pairing. Being a shocking Geography student, you take yourself off to Wikipedia and copy the ‘States’ table. US_States_Table

Of course what you get is the whole table, but this is no problem to NimbleText:

US_States_NimbleText

If you look at the above screenshot you can see that NimbleText works by dividing your data into Rows and Columns. The UI is divided into three areas – the top is you original string, the middle is the pattern you want to apply (to each row) and the bottom is the result.

I’ve set the row separator to be a newline (‘\n’) and the columns separator to be a tab (‘\t’). Once your structure’s set you can use some of the included keywords and functions in the pattern panel to determine your output.

As you can see I’ve used the first column keyword (‘$0’) in my pattern and what this is really saying is:

for each row in my data, take the item in the first column and output it to the Results panel followed by a semi-colon.

So at this stage you’ve got a list of semi-colon separated State names and you can add them to a User cell in Visio:

UserStates

The next step is to either add a second cell of corresponding delimited colors or, include it all in single list I’m going to take the latter option.

Now, if you had a pre-defined set of colors you could introduce that here, but I’m going to generate some random RGB values to show off that, aside from the built-in keywords and functions, NimbleText can also accept custom JavaScript in the pattern panel as well. All you need to do is bracket off your code in a <% code %> combination and it will be executed within the output loop. So adding that to the pattern produces, both the State name and an associated RGB, separated by a pipe character.

US_States_NimbleText_RGB

Back in Visio you could use the list data as follows:

Visio_StatesData_Formula

…which would produce these results:

Visio_StatesData_Values

I think this a great tool and while I’m sure there are lots of applications that manipulate text in this way - I just haven't found one I like as much as this.

Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

Visio Blogs

  • Bill Morein (via Wayback Machine)
  • Chris Castillo (via Wayback Machine)
  • Chris Hopkins (via Wayback Machine)
  • David Parker
  • Eric Rockey
  • Jesse Phillips-Mead
  • John Marshall
  • Michel LAPLANE (FR)
  • Nikolay Belyh
  • Saveen Reddy (via Wayback Machine)
  • Visio Guy
  • Visio [Product] Blog
  • Visio Insights (via Wayback Machine)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon