Oh? Canada

I enjoyed embellishing the US map by states so I decided to create another one. I had considered doing one of Canada, but from personal experience, I knew some of the members of the current Visio team do not like Canadians. Though the earlier Visio team had created an add-on called Maps, the current map offerings is limited. For Canada, the offering is just a blob.

g

Map Ribbon

One of the problems of the Ribbon is that sometimes you have to switch tabs.

The Home tab has a Tools menu and so does the Developer tab, but only the Home tab has a Pointer Tool to switch out of the Tools menu. So, if you are in the Developer tab, you have to switch to the Home tab to switch out of the Tools menu. To “fix” this I add a Pointer Tool to the QAT (Quick Access Toolbar)

To be able to create the maps, I embellished the ribbon by adding a new tab.

The commands in the new tab are.

  • Pointer Tool
  • Shape Data
  • Drawing Explorer – so you get a list of the shapes and see if they are grouped or the shape name is a duplicate (a duplicate will have a name of name.nnn). If you do change the shape names, close and reopen the Drawing Explorer to resort the list.
  • Fragment
  • Macros – provides a list of macros for simple tasks.
  • Record Macro – record a new macro.
  • Stop Recording – stop the macro recorder.
  • Shape Reports – Run a report against the shapes. This is a good way to get a new table of the shape (Codes) and other shape Data.
  • Define Shape Data – Allows global changes to the shapes you select.
  • Fill – you can select a shape and then change the colour to see how the shape stands

If you notice in the QAT, the top line in the image, I added a Pointer tool. The other item in the QAT is Center Drawing.

UK Countries

So, I decided to go home. A while back, I did find a nice map of UK counties on Wikimedia.

When I was a kid, my grandmother sent me a jigsaw puzzle of a jigsaw puzzle map of England. At the time, I did not find it hard. England has been around for centuries how hard can it be to find a list of counties? Unfortunately, during those centuries, counties have split, merged or were renamed. I am not having luck finding a definitive list of UK counties and there are some issues with the shapes in Scotland.
When I clear up the issues I will add it to my Download page. In the meantime Visio MVP David Parker has a Visio map of the UK with data connectivity. https://bvisual.net/2008/04/04/uk-counties-and-boroughs-map-shapes-for-visio/

Back to Canada…

Since the UK County drawing is on hold, I went back to working on the Canadian one. Wikimedia had a detailed map of Canada with provinces and territories.

To turn an SVG file into a Visio drawing it is just a matter of dragging it onto a Visio page and it will create a grouped shape of the SVG drawing. Since I had done this several times before I did several (Select All and Ungroup) to flatten the file to remove the grouping. I then started selecting lakes and surrounding land and fragmenting to make holes for the lakes. This was a long process and when I did a the Select Alls, there were a lot of shapes. Since this was looking like a long project, I decided to restart on a new drawing and open the Drawing Explorer before starting to flatten the file. What I noticed was that the shapes were grouped by Province with the name of the province as the shape name. So, I did a Union on one of those shapes and ended up with a single shape for the province with detailed borders. This was just before I was going to watch a presentation on Excel. I intended to pay attention and play with Visio in the background, but when I found the other provinces were just as easy, I was distracted. I was brought back to reality when the presenter used one of my magic phrases.
“I created the drawing in Visio”
Luckily the presentation was being recorded and I can watch what I missed when it is published.

One of the benefits of the lockdown is that, though I cannot attend any local user groups in person, I can attend online in locations like Vancouver, Scotland and London.

Visio Tape

Though the Canadian borders are well defined on the shapes, the designer of the SVG used a trick with the US borders, they overlapped Canada and they were placed behind, so it appeared the US borders were also well defined. Fixing this was easy by selecting the US shape the Canadian Province and doing a Fragment. Unfortunately, due to the overlap the selected Canadian province was now divided in two. To fix this I used Visio Tape.

Visio Tape is not a Visio feature, but a technique. Like joining two pieces of adjacent pieces of paper, you can use tape to join the pieces. Visio Tape is just a small circle or rectangle that spans two adjacent shapes and guarantees Union-ing will make a single shape. With the pencil tool you can select the corners of the protruding edges and delete them.

You do not have to have a tight fit between the shapes, a large margin may give you other effects.

I did have an issue with the size of the US shape, but I found that when I drew a line from west to east coast through Canada and Fragmented the line and the US, I was able to better deal with the creation of the US borders.

Excel File

Unlike the others, this file does not come with an Excel file. The Excel file is easy to create just run the Visio Shape Report and use the resulting Excel report.

Macros

To help with working with the shapes, I used a few VBA macros. (The code could use a cleanup.)

MapSD

For each selected shape, add a Shape Data section if it does not exist, and Shape Data for
 “Code”,   “CP1”, “CP2” and “CP3” if they do not exist. Set the value of the shape text to be the value of “Code”   

SetName

For each selected shape, set the text to “9 pt” and make the text block smaller.

SizeText

For each selected shape, make the text block smaller.

Cleanup

The Visio drawing is not perfect and could use some cleanup, but it should be a good starting point.

Newfoundland and Labrador

They are one province, but I created them as separate entities. It would not be hard to Union them, rename the new shape, select it and run the code to add the Shape Data

Other shapes

As separate shapes, you can remove the US bits, Greenland, Iceland and the little bits of France.

Here is the Visio drawing of Canada.

I hope you find this useful.

John… Visio MVP in x-aisle
JohnVisioMVP.ca

Published by johnvisiomvp

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