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:


http://www.greenonions.com/archives/2005/01/14/stupid-visio-tricks-narrowings-lines/


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