Refining the Shapesheet Section template

Now that I have put the Braille shapes to bed, back to the Shapesheet Section template with a quicky post.

I started the Shapesheet Section stencil to help with documentation that involves the Shapesheet. I am constantly saying Visio shapes are more than clip art. When it comes to adding Shapesheet sections to documentation, Visio shapes are more than screen shots. The Visio shapesheet is busy and any way to focus the reader on a specific part of a shapesheet is welcome. I came at this project from two sides,
A) using code to dump the content of a shapesheet or shapesheets and
B) from an existing Excel spreadsheet of boiler plate information create a stencil of the various sections as shapes defined in that Excel spreadsheet.

The final step of the project will be to combine the two so I can point the code at a Visio drawing and create a stencil of shapesheet sections from the drawing.

So, I am able to create a Visio stencil from the boiler plate Excel data, but there are a few things I want to do first. The shapes are created in the standard Visio colours and it is set up to create the shapes in alternate colours by having multiple colour assignment statements. The final colour assignment wins. (not very sophisticated). The first enhancement is to base the colours on Page Shape Data. So rather than rebuild the shapes, the user can just change the colour in Shape Data.

First we need the Shape Data…

Sub LoadPageShapeData()
'#99B4D1   RGB(153,180,209) ' Visio blue
'#E3E3E3   RGB(227,227,227) ' Visio grey
'#92D050   RGB(146,208,80)  ' Visio green
'#FF99FF   RGB(255,153,255) ' pink
'#000000   RGB(0,0,0)       ' Black
'#FFFFFF   RBG(255,255,255) ' White
'#FF0000   RGB(255,0,0)"    ' Red
Call LoadPSDsUb("Bkg1", "RGB(146,208,80);RGB(255,255,255);RGB(0,0,0)")
Call LoadPSDsUb("Hdr1", "RGB(153,180,209);RGB(255,255,255);RGB(0,0,0)") 
Call LoadPSDsUb("Lbl1", "RGB(255,255,255);RGB(255,255,255);RGB(0,0,0)")
Call LoadPSDsUb("Lbl2", "RGB(255,255,255);RGB(255,255,255);RGB(255,0,0)")
Call LoadPSDsUb("Lbl3", "RGB(153,180,209);RGB(255,255,255);RGB(0,0,0)")
Call LoadPSDsUb("Lbl4", "RGB(153,180,209);RGB(255,255,255);RGB(255,0,0)")
End Sub

Sub LoadPSDsUb(SDName As String, SDInfo As String)
Dim PropSD As String, SectionShape As Visio.Shape

PropSD = "Prop." & SDName
Set SectionShape = ActiveWindow.Page.PageSheet
If Not (SectionShape.CellExists(PropSD, 0)) Then
  SectionShape.AddNamedRow visSectionProp, SDName, visTagDefault
  SectionShape.Cells(PropSD & ".Label").FormulaU = Chr(34) & SDName & Chr(34)
  SectionShape.Cells(PropSD & ".Prompt").FormulaU = Chr(34) & SDName & Chr(34)
End If
SectionShape.Cells(PropSD).FormulaU = Chr(34) & SDInfo & Chr(34)
End Sub

The Shape Data created is a three element list: Foreground colour, Background colour and Text colour.

To be able to use the Page Shape data, use the blue text. The cell is simply selecting the first element for the Foreground colour and the third for the text colour. I have not filled in the background colour, yet.

If you copy a shape using ThePage shape data to a new page, the shape data is copied. If the page contains that Shape Date is updated.

Visio Guy has another way of selecting colours. Visio Guy Chose Colors with Shape Data

John… Visio MVP in x-aisle

Published by johnvisiomvp

The original Visio MVP. I have worked with the Visio team since 1993