A Visio line pattern

During my usual weekend hunt for Visio items on the net I came across an article by Dan Brown on how to create a simple custom line pattern that indicates direction. The line pattern tapers in the direction of travel. This is accomplished by choosing a behaviour that stretches rather than repeats the line pattern. Dan’s detailed directions are at:


John… Visio MVP

Custom line ends

One interesting feature of Visio that is not well documented is that you can create your own custom fill patterns, line patterns and line ends. For now, I will review the procedure for creating a semicircular line end. Something like:



1) Open Drawing Explorer

2) Select New Pattern from Line Ends. Set the name. Set the scaled option.

3) Select the new master, right click and select Edit Pattern Shape.

4) Place a vertical and a horizontal guide line so they intersect at the center of the page. This will be the end point of the line.

5) Draw a circle, set the fill to none and then drop a vertical line over it’s center.

6) Select the circle and the line and choose Operations –> Trim from the Shape menu.

7) Deselect everything and then drag a selection box over the left side of the circle and the vertical line. Delete. This should leave you with the right side of the circle.

8) Place the center of the circle over the intersection point of the guidelines.


You will have to play with the sizing, but this should give you a semicircle line end and the line will end in the end of the circle. If you apply it to the start of the line, begin, it will be a “(” and it will be a “)” at the end. The assumption is that you want the line end at the end of the line placing it at the beginning will reverse it.


John… Visio MVP

How do the background shapes work?

When dropped on the current page the background shapes automatically adjust to the size of the current page. This is more obvious when the page has a landscape orientation.  This same feature is also used in the border shapes. To make your own background shape, create a shape that has no problems being stretched and then set the Width and Height cell in the Shape transform section. The new formulas should be Width =GUARD(ThePage!PageWidth) and Height =GUARD(ThePage!PageHeight). The Guard will prevent the formula from being changed.

If you do not play with the background you may not need to set the protection cells, but the background shapes do set LockWidth, LockHeight, LockMoveX, LockMoveY, LockRotate and LockTextEdit to 1 in the Protection section.

What may not be obvious when using the background shape is that the shape is not placed on the current foreground page, but on a new background page, called VBackground, that is attached to the page. If you drop more background shapes, the current background shape on VBackground is replaced. The shape accomplishes this by running an add-on called “Make Background” when the shape is dropped.. In the Events section set the EventDrop cell to RUNADDON(“Make Background”)+SETF(“EventDrop”,0). The last bit, “+SETF(…)”, clears the content of the EventDrop Cell once the shape is dropped.

John.. Visio MVP

Only one background page?

In several online tutorials (non Microsoft), it is usually mentioned that you can only have one background page. This is partially true. A page can only have one background page. This is often interpreted as meaning only foreground pages, but background pages can also have background pages. So it is possible, that a foreground page can have a series of background pages attached to it. Why would you want to do it? The advantage of a background page is that you can place objects in consistent locations on all pages that print. (foreground pages print, background pages do not print.) So with multiple background pages, the one at the end of the chain could contain the title block and any artwork common to it. The next to last could contain common item specific to a subset of the pages and so on.

Three minor point on background pages.

  1. Not all background pages are labelled background. (Mark: how about different colours on the tabs?)

  2. They will appear to the right of the foreground pages.

  3. Though they can not be printed they will show up in print preview.

John… Visio MVP

Headers/Footers or Background Pages?

Anyone new to Visio may not be aware of why Visio has both Headers/Footers and background pages or know that there is such a thing as a background page.

In Visio 1, the developers created the concept of type basic types of pages; foreground and background. The foreground pages were the pages that were actually printed and the background pages contained information that was to appear in a fixed position on the foreground page. So the concept of Headers/Footers common in other product like Word and Excel was implemented by creating a background. Anything that can be placed on a foreground page can be placed on a background page including special fields that would inherit information from the foreground page it was attached to (i.e. page name or page number).

Visio 5 introduced the concept of Headers/Footers to address a specific printing problem. When a Visio drawing prints over several physical pages, there was a request to have the individual physical pages marked with a header/footer. Since this was addressing a specific problem, the amount and type of information in the header or footer was limited.

As long as the Visio page is the same size as the physical page, the background page can do everything the Header/Footer can do (and more). If the information in the header/footer is adequate, then they may be more convenient to use. It’s your choice.

John… Visio MVP

Document ShapeSheet: Where? What? Why?

Note: This post is a lot funnier if you try to read it out loud!

Document ShapeSheet

Visio solution developer’s will be excited to learn that Visio has a Document ShapeSheet. This ShapeSheet looks similar to a page’s ShapeSheet, which in turn is similar to any old shape’s ShapeSheet.

While said ShapeSheet has fewer sections than a stock shape’s, it does support the User-defined Cells section. This is a great place to store variables and values that apply to all shapes and pages in the document.

There are two ways to access the Document ShapeSheet. Guess which one isn’t documented:

  • Hold the Shift key, then click: Window > Show ShapeSheet
  • View the Drawing Explorer and right-click on the Drawing object at the top.

The syntax for referencing a variable in the Document ShapeSheet is as follows:

User.mvp = TheDoc!User.mvp

Seemingly simple, a Shift + Show ShapeSheet sleight-of-hand will have you setting your solutions ship-shape in seconds!

Chris Roth, Visio MVP


The purpose of this blog is to provide the community with information about Visio. We will try to provide both technical information as well as trivia.

Visio has been around for thirteen years and gone through almost as many versions. Five years ago it was aquired by Microsoft and is now member of Microsoft’s Office family. For more information on Visio’s history.  http://www.mvps.org/visio/History.htm

The Visio MVPs; Al Edlund, Senaj Lelic, John Marshall, David Parker, Chris Roth and Graham Wideman