Microsoft Office Visio 2007 Professional provides the ability to color shapes by different values in selected cells. This is great, but just how many color variations can your eyes detect? If you have lots of different values, then the color by value automatically produced colors can look too similar to be able to distinguish them apart. In this article, I propose a method of automatically assigning different fill patterns to similar colors so that they can be visually separated.
[Read more…] about Using Fill Patterns with DataGraphic Color By Value
bVisual Blog by David Parker
Visualizing Information the Smart (Diagram) Way
Those of you who are attending the Visio Conference in Redmond this week will know that I am presenting in the developer track. I am demonstrating some automation examples for building organization charts from SQL Server AdventureWorks database (slightly enhanced) in Visio 2007 Professional, without using the Org Chart Wizard.
This means that you have far more flexibility with the diagram layout, and it demonstrates Link Data to Shapes, Data Graphics and Pivot Diagrams.
The example stencil which includes all of the VBA samples used is attached to this post, along with the PowerPoint slideshow, and the SQL Server scripts to enhance the AdventureWorks database.
http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/MSVisioConference2008_DJP.vss
http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008_DJP.pptx
http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008DBScripts.zip
Creating PolyLines From Existing Shapes in Visio
A couple of posts in the Visio newsgroups got me thinking this weekend. One was from an Autocad conversant user who would prefer Visio to draw a continuous line between points rather than doing the normal click, hold and drag with line tool because he has tendonitis; and the other wanted to draw a circle centered on a vertex because he is drawing land boundaries.
Visio has a PolyLine line type, but, as far as I am aware, it can only be created in code – there is no menu or toolbar button to enable you to use it. It was introduced for converting CAD lines, and is simply a series of X and Y co-ordinates in a single cell, rather than the normal co-ordinate per row.
[Read more…] about Creating PolyLines From Existing Shapes in Visio
Importing Hyperlinks into Visio Shapes
Visio shapes can have multiple hyperlinks, but it can be a chore to add them with the Insert / Hyperlinks … command. Fortunately, Visio 2007 Professional has the Data / Link Data to Shapes … command.
If you were to have a data source, such as an Excel spreadsheet, that contains hyperlinks (see the example below)…
Finding a Row in a Visio DataRecordset
A recent newsgroup post asked how to find a row in a Visio DataRecordset for a given criteria. Well, I have used the IT Asset Management sample in Visio 2007 Professional to demonstrate how this can be done with a VBA function.
Of course, you may wish to improve the user interface because I limited myself to using an InputBox, and I have assumed that there is only one column defining the primary key of the DataRecordset.
The sub function, FindRow, listed below first checks whether the External Data window is open, and then gets the active DataRecordset. The code then reads the columns of the DataRecordset and prompts for a selection of the number of the column that you wish to search for a value in.
A Working Visio Clock
A recent newsgroup post asked about the ShapeSheet programming of lines in Visio to represent the hands of a clock. Well, it made me think, so here is my solution of a clock in Visio with just the ShapeSheet, and, for good measure, you can set it to refresh every minute!