These are some tips for using the Visio shapesheet.
A description of how the background shapes work.
John Marshall, Visio MVP
|The functionality of the background shapes is based on several shapesheet values and an add-on. To duplicate the functionality, create a shape (it does not matter what the size or shape is) and drag the shape to a stencil. Open the shapesheet of the shape in the stencil and change it’s Height, Width; PinX, PinY and EventDrop function. The specific shapesheet changes are:|
In the Shape Transform section Set Pinx to =GUARD(Width/2)
Width to =GUARD(ThePage!PageWidth)
Height to =GUARD(ThePage!PageHeight)
PinY to =GUARD(Height/2)
In the Events Section
Eventdrop to =RUNADDON(“Make Background”)+SETF(“EventDrop”,0)
|Colour based on status:|
A suggestion on how to set the colour of a shape based on the value of a field.
Mark Nelson, Visio
|Put this formula in the FillForegnd cell. |
=Lookup(Prop.Status,”Black;White;Red;Green;Blue;Yellow”)(A formula error will occur if the custom property, in this case Status, does not already exist.) Lookup will match the value of the custom property Status to the list shown above. The value returned by Lookup will be a number starting with 0 which corresponds to the position of the matched value in the list. The list shows Visio’s numbering sequence for the colours.
If the property choices are “Warning”, “Caution” and “Clear” with corresponding colours. In the Lookup formula, replace the words “Red”, “Yellow” and “Green” with “Warning”, “Caution” and “Clear”. You must leave the other items in as place holders to get the correct colour position. The final formula would be:
Chris Roth – the Visio Guy
|To check in the shapesheet if a shape has no text try:|
StrSame( ShapeText( TheText ), “” )Black magic… – Chris
|Add shape to Offpage Reference:|
Chris Roth – the Visio Guy
|When you double-click the “off-page reference” shape, Visio sends you to the correct page and selects the corresponding off-page reference shape, but you have to scroll to find it. |
1. Add an Off-Page Connector. The full sub-address will end up looking like this: “Page-1/sheet.14” when you’re done.
2. Select the shape and hit Ctrl+K.
3. Click the Browse… button next to the Sub-address field.
4. Select a zoom, such as 200% in the Zoom drop-down.
5. For Shape, type the sheet-id of the target shape.
(To get the sheet-id, go to target shape, select it, then choose Format > Special. You’ll see an “ID” at the very top of the dialog. Use this id, plus the syntax: Sheet.ID to set the Shape field. For instance: Sheet.14.)
|Pop up text on a document saved as HTML:|
Office Graphics – Visio Microsoft Corporation
|You can add the User.visEquivTitle cell to your shape and provide a string that will display as a tooltip in the web output. The shape must also have at least one custom property for the tooltip to be visible. |
1) Select the shape in your drawing that you want to add a web tooltip for
2) Go to Window > Show Shapesheet3) Go to Insert > Section, check User-defined cells and click OK As you can see this is a bit involved. The capability was designed more as a developer feature than an end user feature. I recommend tying the Shape ScreenTip to the User cell so that you see the same tooltip in both Visio and the web output. It should also be possible to use Macro Recorder to automate these steps. If your shape has a custom property but does not have the User.visEquivTitle cell, Visio will display the shape’s text in a tooltip instead.
4) In the newly created section, click on the row name User.Row_1 to select the title of the row
5) Type visEquivTitle and press Enter – you should now see User.visEquivTitle for the row
6) In the Value cell of that row, enter the text you want to display surrounded by quotes (e.g. “Hello World”)
7) If you instead want to display the same tooltip as the Shape ScreenTip enter =Comment (no quotes)
8) Go to Insert > Section, check Custom properties and click OK
9) You can fill in the custom property Label and Value if you want this information to be visible
10) If you don’t want the custom property to be visible, enter TRUE in the Invisible cell
11) Close the Shapesheet window and repeat for any other shape you like
12) Choose File > Save as Web Page to create the HTML output
|Set RGB fill colour:|