Having recently started a new position and having to dust off the UML skill set, I’ve found a useful feature of Visio that I wanted to share. No doubt has been covered in detail before but perhaps not for this specific example.
I’ve been working on state charts for a system re-development and had a list of existing states from the old application that i wanted to cross reference against the new states i had modeled.
Rather than eyeballing everything manually I decided to use the .xls with my list of status as a data source in Visio and see what was missing from my updated model.
First select the ‘Link Data to Shapes’ option from the Visio ribbon.
Then as your data source, select an ‘Excel Worksheet’ – remember you could use any of the listed data sources to achieve the same objective if that’s easier. It might be a DB extract from a legacy system or a screen dump converted into a table or .xls – the world’s your oyster!
Personally I like the new SharePoint foundation list option, that is a powerful and useful way of incorporating business data into your models – possibilities are interesting there!
Then choose the .xls (or .xlsx!) you wish to use as your data source.
Now we have to select the range in the excel worksheet to use for our data. If you know the range go ahead and type it in, otherwise select ‘Select range’ and manually select the area you wish to use.
Once its in we need to select the column(s) we are concerned with. it may be useful to include an identifier column in your data in case you have integrity issues when changing things later on.
The next screen allows you to assign an identifier column (explained above). This is optional and useful if you plan on updating naming conventions and have a larger set of data.
Select ‘Finish’ to close the wizard.
If the import was successful you will see the ‘External data’ window appear with the columns you selected.
From here you can manually ‘drag and drop’ data onto shapes on your diagram to link, but I suggest using the handy auto-link feature handily provided by Visio 2010.
Assuming you named your shapes in a similar convention to the imported data, in my case it was naming system states and importing old state data, you will get a quick easy link between your source data and your shape elements. If this means tidying up your model and/or source data quickly first then it will probably save you time in the long run.
Like I said at the top of the post, not ground breaking stuff here, but still useful info for those working in this area.