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.
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.
Of course what you get is the whole table, but this is no problem to 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:
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.
Back in Visio you could use the list data as follows:
…which would produce these results:
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.