Carousel

Visio Articles.



Paying my dues

First of all I need to pay my dues to the other Visio websites, blogs and forums, so, in no particular order: tag cloud



Various useful formulae for use in Visio shapesheet cells

  • Resizing shape's width with text:
    Set cell Width = GUARD(TEXTWIDTH(TheText))

  • Resizing shape's width with text, but with a minimum size (10mm in this case):
    Set cell Width = GUARD(MAX(TEXTWIDTH(TheText), 10mm))

  • Resizing shape's height with text:
    Set cell Height = GUARD(TEXTHEIGHT(TheText,Width))

  • Resizing text with the shape:
    Set cell Character -> Size = 10 pt*Height/0.75 in

  • Resizing text with the shape (with minimum and maximum values):
    Set cell Character -> Size = MIN(48 pt, Max(4 pt,10 pt*Height/0.75 in.))

  • Level text - text that is always horizontal, sometimes called 'gravity text':
    Set cell Text Transform -> TxtAngle = -ANG360(Angle)

  • Using an Action to toggle a cell
    1. Create a section -> Actions
    2. in the Menu cell add the text that you want to appear on the shape's right click menu (typically set the text to "Toggle")
    assume we wish to toggle cell "User.Toggle":
    3. in the Action cell add the formula =SETF(GetRef(User.Toggle), NOT(GetRef(User.Toggle)))
    Now when we select Toggle on the shape's menu the value in cell User.Toggle will alternately be TRUE and FALSE.



How-to articles



How to remove extraneous layer information from a shape master

(Instructions for Visio 2003/Visio 2007 - for Visio 2010 the menus are different)
  1. Load the stencil, put into edit mode, open the master
  2. Select the shape's contents (Control-A)
  3. menu Format -> Layer
  4. If you are now asked to enter a leyer name then the shape has a blank layer name! Enter a name (anything - it will be removed later) and press OK
  5. On the Layer dialog click None then OK
  6. menu View -> Layer Properties and tick Remove Unreferenced Layers, then click OK
  7. Close the shape, click OK to update the shape
  8. When done, close the stencil.



Adding a timestamp when code-signing template/document macros

When you code-sign a Visio template or document (from within the VBA editor: menu Tools -> Digital Signature) the document gets signed and all seems fine, except, when your digital certificate expires the documents you signed will also expire and the user will get all sort of horrible warning notices and the macros will no longer work. The missing information that needs to be applied is a timestamp from the certificate's authority. It would be so nice if the signing process were to give you some warning that you need to add the following in the registry:
  • Use the registry editor to create:
    [HKEY_CURRENT_USER\Software\Microsoft\VBA\Security]
  • If your certificate is from Comodo, add key:
    "TimeStampURL" = "http://timestamp.comodoca.com/authenticode"
    If your certificate is from Verisign, add key:
    "TimeStampURL" = "http://timestamp.verisign.com/scripts/timstamp.dll"
    Other signing authorities have similar URLs.
  • Set key "TimeStampRetryCount" = 5
  • Set key "TimeStampRetryDelay" = 5



Adding blank space around connector text

When you add text to a connector, if the text is over the top of the line of the connector then the line is hidden 'under' the text, like so: the problem
If you want to add more space around the text then you'd think this could be done with the text formatting, but not so. You can add extra space characters in front of your text, that works, but adding spaces after the text is ignored.
half-way there
The secret to getting the spaces after the text recognised is to edit the connector text, then at the far right-hand end,
menu Insert -> Symbol -> More Symbols -> Special Characters and select Non-breaking space.
finished
Article added 6th November 2015


Make any shape a container

If you add a container to a page and open the Drawing Explorer window (you will need to be in Developer mode) then open the shapesheet editor for this shape and you will see it contains a User-Defined section. This contains a cell called msvStructureType which has the value "Container". Add this same item to your shape and it will become a container.
Article added 5th September 2019



3rd-party additions for Microsoft Visio

There are various lists available of 3rd-party Visio stencils and add-ons, all of which seem to be totally out of date and full of dead links. I shall endeavour to keep this list up to date, please inform me of any changes or additions. Email me



Connected Shapes

The switch shapes in our Electrical Stencils for Visio each contains an action menu to open and close the switch. The actual way this is done internally depends upon the complexity of the switch and what seemed the best at the time, either multiple shapes within a group, then make these shapes visible/invisible depending on the switch state, or multiple shape geometry sections, making these sections visible or invisible; or, a third method, changing the coordinates of a shapes depending on the required switch state, this results in a simpler shape but it does complicate the calculations required, harder to get right and keep right.

Anyway, each switch shape has an Open/Close boolean variable that can be used to illustrate automation in Visio, so I've created a simple diagram with one master switch, plus a number of slave switches that will follow whatever open/close action is done on the master. This is done by setting the slave shapes' user-defined section cell User.Closed to the setting within the master switch cell Contactor!User.Closed

Description File Version Date Size Download
follow-me.vsd follow-me.vsd 1.0 20th January 2021 266kB Download now
This diagram will work with Visio 2003/2007/2010/2013/2016/2019.



follow-me.png




Making Complex Switches

Our Electrical for Visio and Electronics for Visio stencils contain many different switch types, from simple schematic shapes via abstract shapes for electrical installations to various types of switches for process control. However, switches can be complex creatures and whatever standard shapes we supply will never be adequate for the more discerning user. Hence, we provide shapes with which you can make your own complex switches.

All the shapes below were created using the electro-mechanical stencil from our Electronics for Visio stencils installed into Visio 2003 Standard (but any version 2003/2007/2010/2013/2016 will be the same or very similar). The Snap and Glue settings used while creating these shapes were:

snap and glue settings



One customer had a requirement for various switches for car electrical diagrams ...



1. On/off switch

on/off switch

Create this shape as follows:

  1. Add shape "Switch wiper 2" to the drawing, rotate it to the appropriate angle, duplicate it, do a Flip Horizontal on the shape, set its line pattern to type 9, move it so that the lower ends glue together.
  2. Add 2 "Switch contact 2" shapes to the drawing, move them to the common and right-hand contact locations and glue to the wiper shapes.
  3. Draw the two vertical line shapes using the line drawing tool, glueing one end to each of the filled contact shapes.
  4. Add 2 "Switch contact" shapes, glueing to the other ends of the lines.
  5. Add a "Switch container" shape, send it behind the other shapes using Order -> Send to Back, then move and resize it around the switch components, then set its line pattern to 11.
  6. Select the whole lot, and group. Job done.
on/off switch


2. Push-button

push button

Create this shape as follows:

  1. Add a "Switch contact", a "Switch contact 2" and join with a vertical line using the drawing tool. Duplicate these 3 shapes and align them horizontally.
  2. Add a "Switch wiper 1", move and resize ito above the filled contacts, duplicate and move copy vertically below previous shape, set line pattern to 9.
  3. Duplicate the upper wiper shape, rotate to vertical, duplicate again, move and resize to create button verticals, then duplicate again, move and resize to create button top.
  4. Drop a Triangle shape from the "Basic Shapes" stencil onto the diagram, move, resize and fill.
  5. Add a "Switch container" shape, send it behind the other shapes using Order -> Send to Back, then move and resize it around the switch components, then set its line pattern to 9.
  6. Select the whole lot, and group. Job done.
push button


3. Hi-Lo-beam dipper switch

dipper switch

Create this shape as follows:

  1. Copy "On/off switch" and rotate it through 90°.
  2. Ungroup, resize the container, duplicate the contacts, realign the two switch wiper shapes.
  3. Duplicate a wiper, move and resize to create wiper blade.
  4. Duplicate a wiper twice, move, rotate and resize to create button, and again to create button top.
  5. Add text to contacts, use the Text Block tool to resize, rotate and locate text
  6. Select the whole lot, and group. Job done.
dipper switch


4. Indicator switch

indicator switch

Create this shape as follows:

  1. Copy "Hi-Lo-beam dipper switch" and rotate it through 90°.
  2. Ungroup, remove text from terminals, remove button lines and wiper blade.
  3. Move right-hand wiper into vertical position, move left-hand wiper so it connects to edge.
  4. Duplicate left-hand wiper, move and connect. Adjust shapes to improve symmetry.
  5. Select the whole lot, and group. Job done.
indicator switch


5. Relay

relay

Create this shape as follows:

  1. Drop 4 "Switch contact" shapes and align.
  2. Drop "Relay coil" on page and resize to suit.
  3. Add "Relay pole" shape, move, glue to "Relay coil" and resize.
  4. Add "Contactor" from switches stencil, resize and locate to suit. Glue pole to switch.
  5. Add all four connectors.
  6. Add "Switch container", send to back, set line pattern, resize and move to suit.
  7. Add text to each terminal, then use text block tool to move and rotate text.
  8. Add "Switch container" for pin layout, resize to suit.
  9. Add left-hand vertical line, resize and move to suit. Add text "30", use text block tool to resize and move text.
  10. Duplicate for pins 85, 86 and 87.
  11. Select each block in turn and group.
relay



Making new templates visible to Visio

For Visio 2003 Microsoft added a feature folder named 'My Shapes'. Any Visio stencil placed in this folder will appear in the list of available stencils on the (Visio 2003/2007) menu File -> Shapes or (Visio 2010/2013/2016/2019/2021) More Shapes -> My Shapes menu. This feature is very useful when distrubuting Visio stencils to other users. All you have to do is to tell them to put them in their 'My Shapes' folder and they can use them immediately. You can even create new folders under the 'My Shapes' folder and Visio will see the name and use it to help sort your stencils. Useful.

Unfortunately, there is no similar automatic facility for Visio templates. But there is a work around ...

Open the Options menu:
  • Visio 2003/2007:
    Menu -> Tools -> Options -> Advanced -> File Locations
  • Visio 2010/2013/2016/2019/2021:
    Ribbon -> File -> Options -> Advanced -> File Locations (button hidden right at the end of the screen)
will get you to a dialog box like this:

Visio file locations dialog


You will see that there is a file path in the My Shapes section, just copy and paste that into the My Templates section. Click OK and close all the dialogs. You may need to restart Visio.

Job done.
Any template in the My Shapes folder will now show up in the File -> menu or the template categories. And any folder will appear as a new category of templates!







Visio's Flowchart shapes

Visio comes with some shapes for use in flowcharts, over the years in the various forums there have been questions about what some of these shapes are for and how should they be used. The details of the shapes has changed over the various versions of Visio, here we discuss the shapes that are in Visio 2003, Visio 2007 and Visio 2010.

General comments

How to find these shapes

When you start a new Visio diagram of type Flowchart the Basic Flowchart Shapes stencil is opened automatically, otherwise you can open this stencil using:
(Visio 2003/2007): menu File -> Shapes -> Flowchart -> Basic Flowchart Shapes
(Visio 2010): Shapes Window -> More Shapes -> Flowchart -> Basic Flowchart Shapes

As usual there are metric and US customary units versions, the filenames for each being BASFLO_M.VSS and BASFLO_U.VSS.

Shape text

Almost all of the shapes here should have text added to show what the shape is representing. This is usually done by double-clicking the shape but in some cases may have to be done with the Text Tool.

Connection points

All these shapes have connection points at appropriate places, except, of course, in Visio 2010 you can't even see them until you try to attach a connector to the shape.

Themes

Visio 2007/2010 onwards have "Themes" as a feature and all shapes in those versions are themes enabled.

The shapes

Process

process This is the most basic shape in a flowchart; it may also be called a Task, Activity or Processing step. Here you would add text like, "increment widget count", "state = left 3 characters of data" or "initialise printer".

Decision

decision Without decisions a flowchart is not very interesting! Also called a Condition (or Conditional) it is used to make a choice, often a Yes/No or True/False but can also be used to show a choice of more than 2 options (a Case). Connectors normally enter a Decision shape from the top and exit from the bottom, right or left corners. The exiting connector will usually show the value of the tested condition, i.e. where a test is for "widget count > 15" there will be two exit connectors, one labelled True and one labelled False.

Document

document A rectangle with a wavy line bottom (to represent the edge of the paper) is used to show that some reference to a document is being made, this used to be a paper document but now it might be an electronic one.

Data

data This parallelogram shape is more normally called an Input or Output shape, used to read data or output data. In Visio 2010 this shape is also available in the Audit Diagram Shapes stencil and called "I/O".

Predefined process (Visio 2010 - Subprocess)

predefined process More usually called a "Subroutine" or "Function" this shape is similar to a Process but has two extra vertical edges. "Predefined" is not a good description for this shape, it might be predefined, it might not, it might be defined later in the design process, with late or dynamic linking it might not exist at all!
Visio 2010 - it appears that this shape has now changed name - to Subprocess.

Stored data (Visio 2010 - External Data)

stored data This shape, a rectangle with curved side edges, represents data storage, a general purpose shape that doesn't indicate how or where the data is stored.
This shape has been renamed to External Data in Visio 2010.

Internal storage

internal storage Somewhat reminiscent of a core store type of shape this shape represents data stored internally, so use this to show data stored with internal memory.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Sequential data

sequential data This was a common shape when mass data storage came in the form of paper tape and magnetic tape and had to be read sequentially.
This shape is no longer available in the Visio 2010 flowchart shapes but is still available in the Audit Diagram Shapes stencil named "Magnetic tape".

Direct data (Visio 2010 - Database)

direct data This shape, a representation of a magnetic drum memory, shows data that can be read in a random-access manner. This doesn't mean that the data is in anyway random, just that data can be read from any location at any time without having to read other data first (see Sequential data).
This shape has been renamed to Database in Visio 2010.

Manual input (Visio 2010 - Custom 1)

manual input A rectangle with a sloping top (like the side view of a sloping desk) is used to show that input from the user is required.
This shape has been renamed to Custom 1 in the Visio 2010 Flowchart Shapes stencil but this shape with this name is still available in the Audit Diagram Shapes stencil.

Card (Visio 2010 - Custom 3)

card This is a shape that was appropriate until the 1970s or early 80s but is no longer required (unless you use punched cards). Ignore it.
This shape has been renamed to Custom 3 in Visio 2010.

Paper tape

paper tape This is a shape that was appropriate until the 1970s or early 80s but is no longer required (unless you still use paper tape). Ignore it.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Display

display Representing a CRT based display unit this shape is used to show data output on a screen.
This shape is no longer available in the Visio 2010 flowchart shapes but this shape with this name is still available in the Audit Diagram Shapes stencil.

Manual operation (Visio 2010 - Custom 2)

manual operation A trapezoidal shape is used to show that some manual operation is required.
This shape has been renamed to Custom 2 in the Visio 2010 Flowchart stencil but this shape with this name is still available in the Audit Diagram Shapes stencil.

Preparation (Visio 2010 - Custom 4)

preparation This is supposed to be used to show some operation in preparation for doing a Conditional test.
This shape has been renamed to Custom 4 in the Visio 2010 Flowchart Shapes stencil but is still available in the Audit Diagram Shapes stencil named "Data transmission".

Parallel mode

parallel mode Often called "Concurrent operation", Fork or Join this shape (two parallel lines) is used to indicate two or more simultaneous operations or processing paths. The Visio shape indicates that it should be used to join two shapes that are concurrent, but this is not standard nomenclature.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Loop limit

loop limit This shape is supposed to be used to show the start and end of loops.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Terminator (Visio 2010 Start/End)

terminator This is the shape that would normally be called Start or End. When used as a Start symbol it is quite useful to put a name into the shape to indicate the purpose of this part of the chart.
Visio 2010 - maybe someone at Microsoft reads my scribblings! This shape has been renamed to Start/End but this shape named Terminator is still available in the Audit Diagram Shapes stencil.

On-page reference

on page reference A circle shape is used to show a link to another part of the page, there must be at least two of these shapes on the page, one (or more) with a connecting line coming in from the top and only one with a connecting line leaving from the bottom. The first are Goto shapes, the text within the shape indicating the destination; the second are Destination shapes.

Off-page reference

off page reference Used to indicate that flow now moves to another page within the document. This is a special Visio shape which invokes an add-on, when the shape is dropped on the page the add-on asks the user where the destination will be. If the document currently has only one page then you will be asked if you want to connect to a new page (defaults to "Page-2", if more that one page exists then you can select which page to connect to. Just clicking the OK button at this point creates two shapes, the one you just dropped and one on the destination page. These shapes are normally linked together; hover the mouse over one of the shapes and you will see the mouse cursor change to indicate that the shape contains a hyperlink, double-clicking the shape will take you to the destination of your off-page reference. The destination page and shape is now selected, double-click this and you will be returned to the original page and shape.
The add-on gives you a few options:
  1. Drop off-page reference shape on page: (normally on) this option turns controls dropping the shape on the destination page. This can be useful if all you need is to show is a destination page in general.
  2. Keep shape text synchronized: (normally off). The shapes dropped on the page do not normally have any text. However, if this box is ticked then any text added to one box gets automatically added to the other.
  3. Insert hyperlink on shape(s): (normally on) unticking this box stops the hyperlink being added to the shape(s). Not a very useful option.

Adding text to this shape

If the shape has a hyperlink then you can't add text to the shape by the usual method of double-clicking the shape as double-clicking activates the hyperlink. Instead select the shape and use the Text Tool. This will highlight the shape's text and allow it to be edited. Turn off text editing by clicking the Pointer Tool.

Flowchart shapes

flowchart shapes This shape is four-shapes-in-one! Drop one of these on your page then right-click it, you will see a menu to allow you to select Process, Decision, Document or Data. There are four geometry sections in this shape; the menu enables/disables each section. This is an excellent example of how to create a clever shape of this type.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Auto-height box

auto-height box Nothing especially to do with flowcharts but useful anyway. Enter the text you want, you can change the shape's width and the height adjusts itself automatically to just nicely fill the box.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Dynamic connector

dynamic connector A connector with straight lines 90° angles.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Line-curve connector

line curve connector A curved connector.
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Control transfer

control transfer Who knows what this is for!
This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.

Annotation

annotation Also know as a Comment, this shape is a holder for text that can be used to explain any aspect of the flowchart. This is a grouped shape, one part being the text container together with part of a box to bracket the text, and a connector type part that can be used to join the text area to another shape. This shape has a few interesting aspects that are worth investigating:
  • Move endpoint: There are two of the handles, one at either end of the connector part of the shape. Let's refer to these two handles as the left and right-hand handles (this handedness can be changed as discussed below).
    The left-hand handle moves the end point of the connecting line, use this to glue the annotation line to another shape. If this handle is moved over to the right-hand side of the shape then the whole connector part as well as the bracket part of the shape will move to the right-hand side, and back to the left-hand side if the handle is moved back.
    The right-hand handle is used to move the annotation text area without disconnecting the left-hand handle from any connected shape.
  • Resize shape: At the right-hand end of the text area is a green handle, moving this allows the width of the text area to be changed. There appears to be no maximum size but the minimum can be set to very close to 0. As the width gets close to 0 the handle locks up and you will lose control of it.
  • Bracket Length: This yellow control allows the user to change the width of the horizontal part of the text bracket. The size of the bracket is limited to a minimum of zero and a maximum of the width of the text area, even though the control itself can be moved beyond this area.

This shape is no longer available in the Visio 2010 flowchart shapes but may be available elsewhere.





Comments:

realname: Sandy
email: corrosionqueen (at) yahoo (dot) com

message: Thank you for a complete and logical explanation of Flow Chart shapes/symbols. I still have a few questions, but everything else I have read either oversimplifies everything (terminators, process, decision is all you need) to non-sensical explanations or mere definitions of the shapes. Thanks.

In case you were wondering, my questions are on the decision of which shape one should use when several seem to apply. An example:
A situation occurs where a supervisor must complete two forms, both in a database (a medical referral and mishap report). Which does one use??
Predefined process? All supervisors are taught what to do in the event of an injury/illness.
Manual Input? They have to type/input the data into the electronic reporting system.
Multi-document? Two reports are to be completed.
Data? Inputting information into electronic form.

I have CLEARLY never received formal training on this and am just searching the web. I have yelled at morons on You Tube as often as I have "Huh?" or "DUH!" Your page has logic and humor, important qualities to me. So, please forgive my probably very basic, un-trained confusion.




Showing a path through a flowchart

To answer a question on SuperUser about showing a path through a flowchart, here is an example. Use the Line tool with an appropriate colour, line width and set the line transparency to say 50% to allow the underlying line to show through. .

Description File Version Date Size Download
Overlayed lines overlayed_lines.vsd 1.0 20th January 2021 115kB Download now
This diagram will work with Visio 2003/2007/2010/2013/2016/2019.



overlayed-lines.png




Interfacing to Visio using Lazarus/Free Pascal and Graham Wideman's code

Some time ago Graham Wideman created a demonstration of how to interface to Visio with Borland Delphi. Graham's code was designed for Visio 2000 and Borland Delphi has now moved on and there is also Lazarus and Free Pascal. I thought it might be useful/interesting to get Graham's code working in Lazarus. Most of the code converted automatically using Lazarus's built-in tools, however, I rebuilt the form from scratch.
The result works really well with Visio 2003/2007 and 2010. Waiting for Visio 2013 status.

With Graham's permission I've made the updated files available here:

Description File Version Date Size Download
Graham Wideman's GWVisioDemo updated for Lazarus gw_visio_lazarus_demo.zip 1.0 20th January 2021 874kB Download now
This software works with Visio 2000/2002/2003/2007/2010/2013/2016 (32-bit versions only). To build the software from source code you need Lazarus/Free Pascal.


screenshot



How Visio slows down as more shapes are added

As more and more shapes are dropped on a Visio drawing the program gets slower, ok, this only becomes noticable with hundreds or thousands of shapes but here is an attempt to show this:

I created a Visio VBA macro that
  1. noted the time (a)
  2. dropped one shape at a time onto a page at a random location
  3. noted the time (b)
  4. saved the time difference (b-a) in a file (testdata.txt).
This file was then plotted in Excel (number of shapes so far against time in milliseconds). As can be seen from the graph below, the time to drop a shape initially is about 400mS but is near 1500mS at 300 shapes.

Visio slowdown curve
visio_slowdown.zip





A timeline of the various document/template/stencil formats supported by Visio

Visio timeline

Download VisioTimeline.vsdx







Book Reviews

Microsoft Visio 2013 Business Process Diagramming and Validation by David J. Parker

David has a knack of taking an almost unknown aspect of Visio and making it accessible to mere mortals.
If you try using diagram validation within Visio just from the menus you would import the flowchart rules into your diagram, if it's a flowchart then you might make some progress, if not then you'll just shrug your shoulders and say, yes, fine, what do I do next, then ignore diagram validation for the rest of your life. There are no explanations, no menus to help you change the validation rules. Nothing. Almost as if whoever put it all together couldn't be bothered.
David's book starts at the beginning and takes you through all the steps with more information than you think possible to create diagrams that can be validated, not just plain old flowcharts, but UML, BPMN and all the others; but there is so much more, so much about the internals of Visio, SharePoint, new stuff in the Visio SDK. Go on, have a look.
David's book on Amazon