As we travel around the world, we’re looking at maps every single day. And being a Visio Guy, this naturally causes ideas to formulate in the old noggin. You may have seen and enjoyed the various map downloads from Visio Guy, but today, we’ve got something a little bit different.
I hope you’ll get a kick out of today’s SmartShape: the Multi-Earth Shape. This little bugger lets you choose four views and four color schemes, all with a click of the mouse!
Change Your World
A picture is worth a thousand worlds. Let’s have a look at what you can do with this SmartShape:
You can choose from four views: New World, Old World, Down Under, or Australasia…
…and you can choose from four color schemes: Classic, Subtle, Antique, and Black & White.
The shape is easily configurable using a dual-mode technique. You can either right-click the shape to set the view and the colors, or you can use the Custom Properties (Shape Data) dialog and anchor-bar window.
Beneath the Mantel
I won’t describe every single technical aspect of the Multi-Earth shape, but I thought I’d mention a few tidbits for those of you who are really into Visio development.
After wasting investing a lot of time tracing the outlines of various views of the Earth, I combined (Shape > Operations > Combine) all the islands, countries, and continents into into single shapes. This simplified the task of making a multi-shape, but I still had a LOT of ShapeSheet Geometry sections and rows. These slowed performance, and made wading through the lengthy ShapeSheet rather tedious.
So I used the Polyline Shape Maker to reduce all the geometry sections to single rows, with big, long POLYLINE functions. Zap! Pow! Every Geometry section was now just two rows long!
The four view-shapes could then be grouped together, along with a background circle. Custom properties, User-cells, and Actions were added to the new group. In order to show or hide each view, we first added the User.isHidden cell to each sub-shape, which reacted indirectly to the value of a Prop.View in the group. Then we set the formula for every single Geometry.NoShow cell to refer to this user cell. Since the view sub-shapes had many, many Geometry sections, I used some VBA code to ease the process. You can find out more about various ways to hide shapes or parts of shapes in the article: The Hidden World of Visio Shapes.
The following code snippet adds two user-cells to the selected shape, then sets every GeometryN.NoShow cell with the formula “User.isHidden”. Perhaps you’ll find this code snippet interesting and useful!
Sub SetupMultiShapeItem() Const UserIndex$ = "User.index" Const Index$ = "index" Const UserIsHidden$ = "User.isHidden" Const IsHidden$ = "isHidden" Dim shp As Visio.Shape shp = Visio.ActiveWindow.Selection(1) If shp Is Nothing Then Exit Sub If shp.CellExists(UserIndex$, _ Visio.VisExistsFlags.visExistsAnywhere) = False Then Call shp.AddNamedRow( _ Visio.VisSectionIndices.visSectionUser, Index$, 0) End If If shp.CellExists(UserIsHidden$, _ Visio.VisExistsFlags.visExistsAnywhere) = False Then Call shp.AddNamedRow( _ Visio.VisSectionIndices.visSectionUser, IsHidden$, 0) End If Dim i As Integer, iGeoCt As Integer iGeoCt = shp.GeometryCount For i = 1 To iGeoCt shp.Cells("Geometry" & i & ".NoShow").FormulaForceU = UserIsHidden$ Next i Cleanup: Set shp = Nothing End Sub
I hope you enjoy the Multi-Earth Shape!
Download “Visio Multi-Earth Globe Shape” s!Aj0wJuswNyXlhyDPGbmp5mR_TANk – Downloaded 11464 times – 103.00 B
Kevin Wyman says
Nice shape! Very intriguing effort. How do you go about creating the four main views? Are these separate images that are hidden based on the user selection? (I tried to edit the master to see the various views but it only appeared to be three grouped shapes: big blue circle, new world map, and green outline). I am trying to do something similar so I am trying to go to school with your shapes.
Visio Guy says
Hi Kevin,
There are four different shapes inside of a group. Each of these shapes contains all the points to make the different global views. GeometryN.NoShow cells in every Geometry section of each shape control the visibility of each sub-shape. They react to a setting at the group level — see the User.isHidden cell in the sub-shapes to see how to reference a property at the group level.
– Chris
Visio Guy says
One more thing, Kevin,
The article: “The Hidden World of Visio Shapes” talks about the various methods of showing/hiding Visio shapes. You can read it here: http://www.visguy.com/2006/09/05/the-hidden-world-of-visio-shapes/
Quintin Thom says
Really like your site. Where I can obtain/buy your some of your shapes, I really like these world maps. Yrs Quintin
Visio Guy says
Kevin asked about how I created the four geographical views in the first place.
Well, I actually traced bitmaps in a painstaking way that I wouldn’t expect normal humans to subject themselves to. Here’s more info on some of the techniques I use:
Importing Images as Backgrounds for Tracing
There are probably various sources of vector clip-art or bitmap-to-vector converters that could be used as well. The trick is to get them into Visio in a usable format, which isn’t always so easy.