I need con text.

I was looking through blogs and documentation on the Visio shapesheet and though the author did a good job, sometimes the point was lost because they used screen grabs of the shapesheet. The Visio shapesheet is a busy place and highlighting the key points is not easy. So, I created a set of Shapesheet section shapes that were based on an Excel spreadsheet. The text in the cells is fully editable, so it can be coloured to highlight a cell or increased transparency to deemphasise. Each section is a spate shape, so irrelevant sections can be excluded.
The next step is to populate the shapes with real data. I did copy real dat ato make the shapes, but it would be nice to point the code at a real shapesheet, Doc, page or shape.
One thing I came across was that Visio is heavy on enumeration, so you need to fill in the labels with real words, a list of numbers just will not cut it. Using arrays of text is one way, but the enumerations are not sequential, there are large gaps. So, I went with a Dictionary. The key is a tag followed by the enumeration number. In this case, these are some of the Geometry row names.

Dim MsgDict As Scripting.Dictionary
Sub example()
Dim ky As Variant
Set MsgDict = CreateObject("Scripting.Dictionary")

Call LoadDictionary

For Each ky In MsgDict.Keys
Debug.Print ky, MsgDict(ky)
Next ky
End Sub

Sub LoadDictionary()
Set MsgDict = Nothing

Set MsgDict = CreateObject(“Scripting.Dictionary”)

MsgDict.Add Key:=”Geo139″, Item:=”LineTo”
MsgDict.Add Key:=”Geo140″, Item:=”ArcTo”
MsgDict.Add Key:=”Geo141″, Item:=”InfiniteLine”
MsgDict.Add Key:=”Geo143″, Item:=”Ellipse”
MsgDict.Add Key:=”Geo144″, Item:=”EllipticalArcTo”
End Sub


John… Visio MVP in xaisle

Published by johnvisiomvp

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s