Sandrila Ltd

Visio Super Utilities - V2.3 - 6th July 2008

Visio Super Utilities website

System Requirements and Installation

Requirements


Installation

  1. Create a folder 'c:\Program Files\vsu' and unzip vsu.zip into this folder.
  2. If you are running Windows XP or Vista from a user account with limited rights then you may need to give the program Administrator rights. If you get an error upon startup then check the troubleshooting section at the end of this document.
  3. Start Visio.
  4. a. Visio 2000:
  5. b. Visio 2002/2003/2007:
  6. Check your security settings (below)
  7. Click OK, then close and restart Visio.
  8. If the menu doesn't appear then it can be started from menu Tools -> Add-ons.
  9. If the menu is disabled (grayed) then it may be that Visio needs to update its cache of add-ins. Go back to the Options dialog ->File paths and put an entry into the Add-ons file path or make some change to it. Add a path to a folder, restart Visio. If the menu is now visible then re-edit the Add-ins path to remove any change you made.

Security Settings

You may need to check or adjust your Visio/Office security settings. This seems to change with every new version so I shall point you to Chris Roth's excellent article:
http://visguy.com/2007/05/17/vba-macro-security/


Visio 2000 File Paths

Visio 2003 File Paths


Registration Key

When you purchase Visio Super Utilities you will be sent a registration key by email.

  1. Select and copy this registration key
  2. Open Visio
  3. From the SuperUtilities menu select 'About'.
  4. Click on the Registration Key button and paste your key into the ' registration key' text area then press OK.

The registration key is stored in the registry, hence, the registration only needs to be entered once.


Uninstall

  1. Remove any paths to vsu in Options | FilePaths
  2. Close Visio and delete the vsu folder.

Document Utilities

Close all documents without saving

This will close all the currently open documents. If there are unsaved changes then they will be lost. Equivalent to a "No to All" response when asked to save documents when Visio closes. When you are creating documents by automation and have 83 unwanted but unsaved documents then you may realise how useful this is!


Mark all documents saved

When creating a large number of documents, if the documents are not saved or marked as saved then when you want to exit from Visio without saving the documents, Visio will ask whether you want to save each unsaved document. If you have 100 unsaved documents open then this is inconvenient to say the least.
By marking all documents saved, you may exit from Visio without being asked to save the documents.


List/Goto Document

When dealing with a large number of documents, the built-in Visio method of selecting which document to view is far from ideal. Use the "List/Goto Document" menu to select which document to view. It provides the document type and name to allow you to clearly see all the current documents that are open. The current documents is highlighted. The list of documents is fully Unicode compatible (Japanese is shown in the example below). Note that if there are a very large number of documents then it can take a few seconds to populate the list.
To save the list of documents in a text file, use the 'Save' button. This list is saved as Unicode characters when appropriate.

Word Count

This feature counts all the words in each shape and page of the current document, displaying a total for each page and a total for the whole document, however complex the shape, remembering that shapes can be groups of other shapes to any depth.


Copy all Pages to Other Document (Merge)

This copies all the pages of the current active document into another open document.
To use this feature open both documents, go to the document you wish to copy from, select "Copy all Pages to Other Document" from the SuperUtils -> Document menu, from the dialog box select the document where you want to copy to and select OK. All the pages will be copied to that document. If you select the destination document to be the same as the active document then this will duplicate all the pages in the document.
The new pages are always copied to the end of the destination document.


Compare Documents

The highest level compare works with two documents. Both documents must have the same number of pages.


Shape Text Export (current document)

This feature reads all the text in each shape and page of the current document and outputs it to the dialog box. From here all the text can be read and saved if required.


Document Comment Report

This generates a report on all comments that exist in the current document. Copy the report by selecting the text and use the right-click Copy menu. The report can also be saved to a file from the Save Text button.


Hyperlink Report/Check

This feature reads all the shapes on the current page or document and outputs a list of all the hyperlinks within these shapes. It also takes into account grouped shapes where different parts of a shape may contain hyperlinks.
Hyperlink Check tests the existence of all the linked documents, whether internal or on the internet.


Copy and Paste

Please see the Page section.


Convert Comments to Text Boxes

Comments that have been added to a Visio document cannot be selected, searched, spellchecked or similar. Now you can convert comments into text boxes and use them in the same way as any other shape.


Page Utilities

Compare Pages

Select the page to compare with the current page and list the differences. Each page must have the same number of shapes.


Compare Page Properties

Sometimes you might just want to compare the properties of two pages as this could show up a reason why routing or shape placement is different.


Export Documents/Pages as images

If you need to import Visio documents into a word processor, send them by email or prepare images for a web page then the standard Visio menu options only allow you to save one page at a time.
SuperUtils enables you to export all the pages of the current document or of all the open documents to be saved as images.
The 'Export File Path' is where the images get saved, use the yellow 'change folder' dialog box to change this path (you can also create new folders here); and the 'Export as image type' can beset to one of (BMP, DWG, DXF, EMF, EMZ, GIF, JPG, PNG, SVG, SVGZ, TIF, WMF).

Alternative Web Page Output

The built-in web page export available in Visio is very powerful and has some very nice features. However, the output it produces can be very complicated and if it is to be incorporated into other web pages with manual editing then an alternative, simpler output may be useful.
Also, we've added a few features we find useful.

Save File Path

The folder for all output files. use the yellow 'change folder' dialog box to change this path (you can also create new folders here).

Include Header File

Include the contents of this file before the images.

Include Footer File

Include the contents of this file after all the images.

File Type

Choose one of htm, html or php.

Image Type

Choose one of GIF, JPG, PNG or SVG.
SVG requires that you have an SVG plug-in installed in your browser.

Page Output

One web page per Visio page or the whole lot in one file.

HTML/XHTML

Choose the type of output required.

Use Tables

Whether to use a table to locate the image files.

Separator between images

Adds a horizontal separator line between each image.


Duplicate Page / Copy Page to other Document / Copy Current Page as New Document

This will copy everything* in and on the current page and copy it to:

Visio decides on the name of the new page; you may want to rename it. There are potential problems with copying a whole page:

However, in most cases this feature will make a complete copy of a page. Please let us know of any special problems that you find with this.

Duplicate page asks how many duplicates should be made using a dialog similar to "Add new pages" below. Once you've copied a page to another or a new document you can then duplicate it by Duplicate Page.

* Page Annotations are not copied on purpose as these are normally used to indicate that a page has been commented or reviewed by other people.


Add new pages

Normally, adding new pages to a Visio document can only be done 1 page at a time, if you want to add 25 new pages then it'll take you a long time.
This utility will allow you add as many pages as you want in one simple operation. No range checking is done on the number of pages you want to add except only 3 digits are allowed.

List/Goto Page

When dealing with a document containing a large number of pages, the built-in Visio method of selecting which page to view is far from ideal. Use the 'List/Goto Page' menu to select which page to view. The current page is highlighted. The list of pages is fully Unicode compatible. Note that if there are a very large number of pages then it can take a few seconds to populate the list.
To save the list of pages in a text file, use the 'Save' button. This list is saved as Unicode characters when appropriate.

Rename Pages

Renaming a large number of pages can be a long job. If all the pages need to be renamed sequentially then use this utility.
The example dialog will rename all the pages in the current document as "page-42", "page-43", "page-44" etc. The start text is always used as the first part of the new name and the end text is always placed at the end (seem logical?) - either or both may be left blank. The Page number auto-increments for each page from the starting point that you define, empty is taken to be 0. However, if the page number is negative then the page number will auto-decrement i.e. your pages will be renamed "page-42", "page-41", "page-40" etc.

List Shapes on Page

Sometimes when developing Visio applications you are left wondering why a certain shape on a page isn't being recognised. This utility will list all the shapes on the current page.
You can select the items to be listed from the Options dialog, this will enable you to display, for example, just a list of all the shape names on the page.
The output from this utility can be saved to a text file using the "Save Text" button.


Pagesheet Custom Properties (for Visio 2007 - Page Shape Data)

A problem that we had in the past was that a pagesheet custom property had not been set correctly but this couldn't be seen in the standard shapesheet. It turned out that the property Name and LocalName were different. This utility may help you find similar problems.
Note: as of Visio 2007 Custom Properties are now known as Shape Data.
Here is an example where a potential problem has been found:


Page Report

Similar to the stencil report but reports upon different values for the Name and NameU elements of all the pages in the current document. If the page has its invisible attribute set then you will be asked if you want to make the page visible.


Copy and Paste

Please bear in mind that copying and pasting cells in Visio is a very complicated and fraught with impossible to handle situations. For example, when pasting cells, if the cell contains a formula which references a non-existent cell, then an internal error in Visio will occur, i.e. pasting Custom properties cells which reference User-Defined cells. If the User-Defined calls can be copied and pasted first then this error will not occur but with a complicated set to shape Custom Properties, Actions and User-Defined cells this may not be obvious or even possible, some cells may even reference other shapes or there may be circular references. It does what it can!

Copy and Paste Custom Properties

Use this menu to copy and paste custom properties between pages and shapes. The copied properties are stored internally and can be pasted any number of times to multiple pages, shapes or masters. Just go to the appropriate page and use the Page -> Copy -> Page Custom Properties, then go to the page where you want to copy to and then use the Page -> Paste -> Page Custom Properties.

Copy and Paste User-defined Cells

Ditto for User-defined cells.

Copy and Paste Action Cells

Ditto for Actions cells.

Copy and Paste Layers

Ditto for Layers except layer information cannot be transferred between pages and shapes (or masters).


Copy all Pages to Separate Documents

With this menu you can split a document of n pages into n separate documents. You will be asked if you want to copy over each page's name, if not then each page will be given the default new page name allocated by Visio (this is language dependant, the English language version being "Page-1").


Page Comments Report

This displays a report of all comments made on a page, these comments can be copied and pasted into another document by selecting the text and right-click menu. The report can also be saved to a file from the Save Text button.


Convert Comments to Text Boxes

Comments that have been added to a Visio page cannot be selected, searched, spellchecked or similar. Now you can convert comments into text boxes and use them in the same way as any other shape.


Shape Text Export (current page)

This feature reads all the text in each shape on the current page and outputs it to the dialog box. From here all the text can be read and saved if required.


Shape Utilities

Compare Shapes

Compare two shapes and list the differences. At the moment this feature cannot work with grouped shapes. Just select the two shapes to be compared. The X and Y coordinates of the shape's position on the page are not compared as the chances are that they will always be different.


Shape Substitute

Sometimes you may want to change all your squares into triangles, we all need to do things like this occasionally! You can even refresh your shapes when an updated master is provided in a new stencil.
If one shape is selected then this shape's name will be presented as the first choice in the "Shapes to replace" box. If a selection has been made on the page then this selection will also be available substitution i.e. change all selected shapes to the new shape. Also in this list will be the names of all the other shapes on the current page. If the shapes being replaced are a selection then there is an option to ignore all connector shapes within the selection.
The scope of the change can be selected from just the current page, the current document and all the open documents.
This utility searches for the new shape in the first open stencil that it finds so it's best to only have open one stencil, the one containing the new shape that you require.
If either or both of the two shapes are grouped shapes then complications can arise in the substitution. Warnings will be shown if this is the case.
When the new shape has been added to the page, before the old one is removed various properties of the old shape can be copied over - turn off the ones you don't want. Sometimes there may be the need to maintain the shape's Name and NameU properties, this can be done with the check box at the bottom of the dialog box.
When the Substitute button is pressed, the button will be greyed out and the hourglass wait cursor will be shown until all the substitutions have been made. If there are a large number of shapes/pages/documents then this may take some time.
P.S. This feature uses the clipboard and any previous contents will be overwritten.


Remove Small Details from Shapes

Some shapes, especially shapes that have been imported from CAD software, may contain a huge amount of detail that is not needed in the Visio shape. Not only does all this detail take up a large amount of memory and make the resulting file rather large but it also makes operations involving these shapes slow and cumbersome.
This utility allows you to remove items below a certain size from your shapes. It works particularly well with grouped shapes and digs down into any level of grouping.


Insert Symbol

Word has an "Insert Symbol", why not Visio? OK, this is now in Visio 2007! This menu loads Charmap and gives you access to all the characters you could possibly need. A few hints:


Invert Selection

Sometimes you may have a number of shapes selected on a page but what you want is everything on the page except those shapes - well, now you can!


Shape Nudge

You might want to move a shape or selection of shapes by a small or a defined distance, this utility will move the selected shape or shapes by the user-defined distance and units. No range checking is done so if you move a shape 100000 cm and it goes off screen then just move it back in the opposite direction.
The dialog box can be moved anywhere on your screen to keep it out of the way of the shapes that you are moving, also you can use other features of Visio without having to close the Nudge window.
Units can be selected in (metric) mm, cm, m and (imperial) in, ft and yd.


Grouped Shape Report

This report shows the contents of a grouped shape. It lists all the shapes that make up the group together with all of the identifiers for those shapes. If the Name and NameU for a shape within a group are different then you will be asked whether you want to rename the shape.


Selected Shape(s) Text Export

This feature reads all the text in each selected shape on the current page and outputs it to the dialog box. From here all the text can be read and saved if required.


Clear Shape Text Formatting

Use this menu to clear all the text formatting for the selected shapes. The text font is set to font 0 (Arial) at 8pt and the colour is set to black. If the text has been set as protected then the formatting will still be cleared and any protection is retained.


Shape Watch

This feature allows various properties of a shape (or shapes) to be monitored.

Select the shape to be monitored, right-clicking on the shape watch window will show the add/delete item menu. Select "Add". You will then be asked for the cell name to monitor. The full list of available cells is beyond this document but may be found in the Visio Developer documentation and in the Visio SDK. If, say, cell PinX is entered, pressing Ok will enter this shape and cell into the first available slot in the watch window, the value will be shown and updated dynamically. If the shape is moved, the displayed value will be updated.
To delete an item from the window, select the item in the watch window, then right-click and select "Delete" from the menu. You will be asked to confirm deletion.
Only 4 shapes/cells may be monitored currently.





Copy, Paste and Delete

Copy, Paste and Delete Custom Properties

You can use this utility to copy custom properties from one shape (or master) to another or a page. Just select the shape from which you want to copy and use the SuperUtils -> Shape -> Copy -> Custom Properties menu, then select the shape or shapes to which you wish to copy these properties and use the SuperUtils -> Shape -> Paste -> Custom Properties menu. Or you can paste the custom properties to a page with the SuperUtils -> Page -> Paste -> Custom Properties menu.
Once a set of custom properties has been copied they can be used to paste many times to as many shapes or pages as you want. You can even paste multiple times to the same shape but Visio will allocate a new name to any duplicate row as a shape cannot have two rows with the same name. The properties are not stored in the regular copy/paste buffer so you can use normal copy and paste operations without overwriting any stored custom properties.
You can also delete the custom properties from one or more shapes (or masters) using the SuperUtils -> Shape -> Delete -> Custom Properties menu.

Copy, Paste and Delete Connection Points

You can copy connection points from one shape (or master) to another, pasting back to the original shape duplicates all the connection points which can be useful if you want, say, to create a large number of connection points and then edit them. Once a set of connection points has been copied they can be used to paste many times to as many shapes as you want. The connection points are not stored in the regular copy/paste buffer so you can use normal copy and paste operations without overwriting any stored connection points.
This utility can also be used to delete all the connection points for any number of shapes on a page, even grouped shapes.

Copy, Paste and Delete User-defined Cells

You can copy user-defined cells from one shape (or master) to another or to a page. Once a set of user-defined cells has been copied they can be used to paste many times to as many shapes or pages as you want. The cells are not stored in the regular copy/paste buffer so you can use the standard copy and paste operations without overwriting any stored user-defined cells.
This utility can also be used to delete all the user-defined cells for any number of shapes on a page.

Copy, Paste and Delete Action Cells

You can copy action cells from one shape (or master) to another or to a page. Once a set of action cells has been copied they can be used to paste many times to as many shapes or pages as you want. The cells are not stored in the regular copy/paste buffer so you can use the standard copy and paste operations without overwriting any stored action cells.
This utility can also be used to delete all the action cells for any number of shapes on a page.

Copy and Paste Geometry Sections

Geometry sections can be copied and pasted between shapes only, if the "copy from" shape contains more than one geometry section then you will be asked which one you want to copy. Pasting in the geometry data (it can be to the same shape, any other shape or multiple shapes) always creates a new geometry section.


Stencil Utilities

Manage Favourite Stencils

Sometimes you always want to load a number of stencils, the shapes that you use every day. From the Manage Startup Stencils menu just add the stencils that you want to use. You can delete the ones you no longer require by selecting them and clicking the Delete button. A stencil can also be temporarily prevented from being opened by turning off its check mark. You can also prevent any of the stencils being opened by setting the Active tick box to unticked.


Close All Stencils (without saving)

This option closes all the open stencils for all open documents.


Delete Item from Stencil

Some shapes in a stencil can be invisible or cannot be deleted by the normal method of opening the stencil for edit, selecting the shape and selecting delete from the menu.
If you have a shape like this that you need to delete from a stencil then:

  1. Make a copy of the stencil first in case it all goes wrong!
  2. Now open a blank document then open the stencil.
  3. Use the menu SuperUtilities -> Stencil -> Stencil Report and get the index number of the shape that you need to delete.
  4. Now use the Delete Item from Stencil menu to delete this item.

Stencil Report

When developing a stencil or Visio application, the Name and NameU of a master shape within a stencil can be very important, especially when the Name and NameU are expected to be identical.
Normally the NameU of a master shape can only be set when the master shape is created and this same NameU will be kept when a new shape is developed from an original or the shape is renamed.
For each shape within the currently openstencils this utility firstly lists the Name and NameU and then checks that the Name and NameU are identical, if not then the user is asked whether the NameU should be set to be identical to Name. Then the shape's prompt, hidden status, icon size all are output followed a check on whether the shape's icon is always updated whenever the master shape is edited. Finally, some shapes will be listed here but still not be visible within the stencil. These shapes can be custom line patterns, line ends and fill patterns.
The output from this utility can be saved to a text file using the "Save Text" button. Here is am example of the output showing a shape (one of our own shapes!) where the icon has been accidentally set to update when the master is edited.
At the end of the report a summary is given of the total number of shapes with the number of stencils.

Stencil Display

Back in the days of Visio 2000 there was a useful feature for showing a graphical display of all the shapes in a stencil. For some reason this has been discontinued. Never mind, I've written an alternative version.
Open the stencil and choose Stencil Display from the SuperUtils Reports menu, select the stencil you want to show, on a standard portrait format page 3 by 5 images should be OK, if you want more or fewer images per page then adjust these numbers. Some Visio shapes cannot be displayed properly:

  • Backgrounds
  • Shapes that invoke an add-on
  • Shapes that calculate their size from other shape
  • Shapes that extend their geometry outside of their nominal dimensions.

Here is an example for the Basic Shapes stencil.


Application Utilities

Application Caption Control

Many Windows applications tell you the full name of the document you are working on by putting the name in the program's title bar. For some reason Visio doesn't. In much of my own work I have a couple of Visio documents open, often of the same name but in different folders. It can be very difficult telling which is which.
Problem solved. Now you can put your diagram name in the Visio title bar.
This feature is for registered users only, it does work in the unregistered version but turns itself off again as soon as you use any other Super Utilities feature.


List all Add-ons

When developing Visio add-ons it can be useful to know not only that your own add-on has been recognised but also the names of all the other add-ons recognised by Visio. If there is a clash of add-on names then one of the add-ons won't be working!
The output from this utility can be saved to a text file using the "Save Text" button.


Hide Shape Search Window

Unlike many of the other windows available in Visio the shape search window cannot be turned off from the View menu. The is menu will allow the window to be hidden. This feature is not needed for Visio 2000.


Macro Store

Visio can store VBA macros within templates and stencils, however, there is no convenient way of making macros available for use in any diagram. The Macro Store facility we provide here maintains a store of any macro you wish to keep. Macros can be added, edited and deleted, and copied for use within any Visio document. Macros cannot be executed directly from the Macro Store as this would break the security features in Visio.
a. Selecting a macro from the list displays that macro in an edit window.
b. Right-click on the white background area to bring up the menu.
  • Add Macro - opens a new blank edit window, enter the text for the macro, or paste into it, Save when done.
  • Rename Macro - renames the macro.
  • Copy Macro to Clipboard - copies the selected macro to the clipboard, you can then paste it to the VBA editor.
  • Duplicate Macro - duplicates the selected macro and asks for a new name.
  • Delete Macro - deletes the selected macro, after asking for confirmation.
  • Settings - just one setting at the moment, the location of the macro store, by default set to the folder "My Documents"/VSUmacros.

Appendix

Using these utilities from the Visio Shapesheet

Most of the features provided in these utilities can be accessed from your shapes via the shapesheet, or your toolbars and menus. Rather than duplicate other documentation on this, look in the Visio Help files for RUNADDONWARGS.
The Addon name should be set to "Visio Super Utilities' and the parameter to one of:

Troubleshooting

If you have any problem with this software, here are a few pointers and solutions: Please contact Sandrila Ltd at support@sandrila.co.uk with any questions or problem reports.


Acknowledgements

The development of VisioSuperUtilities has been aided and abetted by the following software applications and tools (in alphabetical order):