Share:

" /> Visio Guy » Visio Advent Calendar
Home » Seasonal, Shapes

Visio Advent Calendar

Submitted by on December 1, 2006 – 8:55 pm | | 23829 views 4 Comments

Read Full ArticleDecember is here and Christmas is near! What better way to celebrate than with your very own Visio Advent Calendar!

I’ve created a Visio file that’s full of all sorts of goodies. Just open the file every day from now until December 25th and you’ll get a new visual, Visio treat!

What’s Behind Door #3…

The .vsd file consists of 25 doors, with a Visio suprise behind each one! When you open the file the drawing knows which day it is and opens the appropriate doors.

Note: you may have to wait up to one minute for the doors to update, because of the way the date functionality works. This just adds to the suspense. By the time you’re back from the coffee machine, your daily treat should be waiting for you!

Here’s an example of what you should see on December 1st:

Visio Advent Calendar Doors

How It Works

The magic works by using the ShapeSheet, of course! In the Page’s ShapeSheet, there are a few special user-cells with the following formulas:

User.now = NOW()

User.currentMonth = MONTH(User.now)

User.currentDay = DAY(User.now)

User.day = IF(User.currentMonth<>12,0,User.currentDay)

You can see the Page’s ShapeSheet by deselecting all shapes on the page, and choosing Window > Show ShapeSheet from the menu. User.now holds the raw date information. Since the NOW() function only updates every minute, you may have to wait a bit when you open the drawing to see the latest changes.

User.currentMonth and User.currentDay parse the data from User.now, so that we can check the month and day in User.day.

Each Door shape has a custom property called: Prop.OpenDay. The shapes have the values 1 through 25 stored in this property. Another cell in the door shapes determines whether the doors are open or closed:

User.doorsClosed = ThePage!User.day

So if the Page’s day-value is greater than or equal to the shape’s Prop.OpenDay, then the doors will be open, and we’ll be able to see the treat behind the doors. Each door shape is a multi-shape that contains the closed- and the open-doors. The GeometryN.NoShow cells are used to show and hide the shapes, depending on the state of User.doorsClosed.

Clever Layers

The door shapes are on the Doors layer, and some of the background arch-shapes and explanatory text are on the Backgrounds layer. These layers are locked by default, so you won’t end up accidentally selecting unimportant shapes while you’re trying to play with your newly-exposed goody-shapes.

Since using the View > Layer Properties… dialog is a pain in the butt, I’ve added quick access to viewing and locking these two layers in the Page’s context menu. Simply right-click a blank area of the page, and you’ll see the following menu:

Advent Calendar Menus

You can quickly change the visibility and locked state of the two layers via these menu items.

Visio Advent Calendar 2006 (589.8 KB) - 756

4 Comments »

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*