Whether you change size or position, data stored with the shape, select a context menu item or double-click, a Visio shape can be built to show that something has changed.
A classic example of this is a simple rectangle that changes color when you extend it beyond a certain length…
Conditionally Formatting a Visio SmartShape
To build such a shape, you would simply draw a rectangle, then edit the FillForegnd cell of it’s ShapeSheet–the spreadsheet-like interface behind every Visio shape.
Using familiar, spreadsheet-style syntax, you can create a conditional IF formula, that will turn the shape red when it was stretched beyond a specified length.
You’ll find the FillForegnd cell in the Fill Format section of the ShapeSheet. An example formula that you could use to create this conditional formatting looks like this:
FillForegnd= IF( Width <= 1in, RGB(0,255,0), RGB(255,0,0) )
Which translates like this:
- If the shape is less than or equal to 1in, then the fill color is green–RGB(0,255,0)
- If the shape is greater than 1in, then the shape is red–RGB(255,0,0)
Visually, it looks like this:
It’s Not Rocket Science, it’s Ancient History
This sort of stuff has been going on for over 16 years! I recently found a very old example of this simple type of smart behavior on my hard drive.
In that dusty archive was a Visio file that employs slight variations on the simple technique I just described. It combines and arranges simple pieces into a more complicated system, which packs a nifty surprise at the end!
For fun, I checked the attributes of the file, and found that it was:
last modified on Friday, November 13, 1992, 8:08:08 AM
in Seattle, Washington, USA.
Here’s a preview of what the file looks like when you open it. You’ll want to download the actual .vsd to get the full enjoyment.
While we are waxing historic, I’d like to add that this file was created by Olav Martin Kvern.
Ole is a seasoned veteran in the desktop publishing and graphics business. He is an accomplished expert and author of many books about Adobe InDesign, Freehand and Pagemaker. He served a stint at the Visio Corporation as the original Shape Master Boss, where he created this drawing as a ShapeSheet proof-of-concept.
Now, be off ! And find what’s lurking in that dark room!
Download “Fun”s!Aj0wJuswNyXlhU_9gPwyjqXnvOiJ – Downloaded 2477 times – 103.00 B