Over a year ago, I wrote a blog about Page Grids and Off Page References ( see http://blog.bvisual.net/2011/09/02/page-grids-and-off-page-references/ ), and I promised to accommodate page margins. In addition, a user commented that a matching printable grid would be useful …. so here is an update. In this blog I provide an updated Off-page reference master, along with new GridLines and GridLabel masters.
The GridLines master uses the same page Shape Data rows that were described in the previous blog. and automatically displays the correct number of column and row lines (maximum 26 each), leaving out the page print margins.
The GridLabel master calculates the Row and Column that it is within, and you can choose whether to display the Row and/or Column labels. I have made the GridLabel shape to be separate from the GridLines shape, so that you can place them wherever you like.
The formula for Prop.Row is:
=GUARD(INDEX(IF(ThePage!Prop.BottomToTop,INT((PinY-ThePage!PageBottomMargin)/((ThePage!PageHeight-ThePage!PageBottomMargin-ThePage!PageTopMargin)/ThePage!Prop.NumberOfRows)),ThePage!Prop.NumberOfRows-1-INT((PinY-ThePage!PageBottomMargin)/((ThePage!PageHeight-ThePage!PageBottomMargin-ThePage!PageTopMargin)/ThePage!Prop.NumberOfRows))),ThePage!Prop.RowHeaders))
And Prop.Column is:
=GUARD(INDEX(IF(ThePage!Prop.LeftToRight,INT((PinX-ThePage!PageLeftMargin)/((ThePage!PageWidth-ThePage!PageLeftMargin-ThePage!PageRightMargin)/ThePage!Prop.NumberOfColumns)),ThePage!Prop.NumberOfColumns-1-INT((PinX-ThePage!PageLeftMargin)/((ThePage!PageWidth-ThePage!PageLeftMargin-ThePage!PageRightMargin)/ThePage!Prop.NumberOfColumns))),ThePage!Prop.ColumnHeaders))
You can download PageGridWithMargins.vsd
Smart Radio Buttons and Check Boxes in Visio
A recent project requires an interactive tutorial within Microsoft Visio desktop where a lot of the questions need a single answer using radio buttons, or multiple-choice answers using check boxes. I thought that this would be a great use of the list containers capability because the questions and answers could be part of the container…
Using Button Face Ids in Visio
Microsoft Visio desktop has the ability to display icons from a built-in list of Office icons on Actions and Action Tags (nee Smart Tags). These can be set in the ShapeSheet by using the desired number from several thousand in the ButtonFace cell. Although there is the ability to add better icons using code, the…
Grid Snapping Revisited
I have previously tackled the subject of snapping to grids in Visio desktop (see https://bvisual.net/2018/06/19/really-snapping-to-grids-in-visio/ ) but a recent project required me to improve the example because it did not respond to all cursor arrow keys. The problem was that the previous solution could not understand which arrow key had been clicked, therefore it did…
Synchronizing Visio Shape Fill Color (or almost any cell) across pages
I was recently asked how the color of one shape can be changed and for other shapes to be automatically updated to the same color … even if they are on different pages! Well, it is possible with Microsoft Visio’s awesome ShapeSheet formulas. In fact, this capability is not limited to the FillForegnd cell ……
Positioning Visio Shape Text Block with a Control Handle
I was recently asked how a control handle can be added to a Visio shape so that it can be used to re-position the text block. Fortunately, it is extremely easy to setup, and requires just two formulas to be updated in the ShapeSheet. This is a great use of the SETATREF(…) function. (more…)
Understanding Segments of Visio Geometry
I recently had to revise my understanding of the POINTALONGPATH(…) function in Visio because I was getting a #REF! error in some cases. My particular scenario requires a line with a number of vertices that are initially all in a straight line but can be moved by dragging controls around that each vertex is bound…
Leave a Reply