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
Using Visio Color by Value on Connectors
Data Graphics in Visio Plan 2 and Visio Professional is great, but it only enables us to use them with 2D shapes in Visio, i.e. not on connectors. So, what if you want to change the line colour of the connectors between the 2D shapes because of the data flowing between them? Well, it is…
Using Notepad++ to Edit Visio ShapeSheet formulas
Visio shapes get their smartness from the formulas that are entered into the ShapeSheet, but editing these formulas can be extremely tricky and prone to error because of the lack of a modern programmer’s interface. Formulas can be quite long (up to 64k characters) but even medium size ones like the one in User.GetWorkdays cell…
Adding a second Function header bar to Visio swimlanes
I was recently asked if a second function header bar can be added to the swimlanes in the cross-functional flowchart templates in Visio. Some swimlanes can get quite wide, so it can be useful to have a duplicate function header shape on the far-side too. It is quite simple to duplicate the existing function header…
More Parsing XML Data in Visio Shapes
My last article looked at parsing an XML string with a known structure and order of elements and attributes. This can be acceptable in some scenarios, but what if the elements or attributes are in a different order? Then it is necessary to use the element and attribute names rather than their index position. This…
Parsing XML data in Visio Shapes
One of my current projects uses XML data, and some of the values in the XML data control the display and content of Visio shapes. Therefore, I looked deeper into how the XML data can be used directly to control parts of the graphics. Although the external data linking feature in Visio Professional and Visio…
Highlighting dirty text in Visio shapes
I suppose I should explain what I mean by dirty text first 🙂 I often display the value of a Shape Data row in Visio text, but sometimes the solution requires that the value is also editable. This is ok if the client accepts that all editing is done with the Shape Data window or…
Leave a Reply