• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Visio Guy

Smart graphics for visual people




  • Home
  • Hire Me
    • Hire Me
    • Résumé
  • Products
    • Products
    • Bubble Revision Shape
    • Layers to Pages Utility
    • Rack Unit Dimension Line
    • Radial Elements Tool with up to 100 Wedges
    • Text on a Circle Visio SmartShape
  • Index
    • Articles by Date
    • YouTube – VisioGuy
    • Download Information
    • Suggestion Box
    • Shop
    • Visio Art
    • Visio Links
    • – Visio Shapes & Stencils
    • – Visio Templates & Drawings
  • About
    • About
    • Donate
    • GitHub
    • jsFiddle
    • Reading List
    • Subscribe & Follow
      • – E-mail
      • – facebook
      • – Twitter
      • – RSS
    • Privacy Policy
  • Discussion Forum
You are here: Home / Visio Content / Shapes / Maps & Geography / Multi-Earth Shape

Multi-Earth Shape

June 6, 2007 By Visio Guy 7 Comments

Multi-Earth ShapeAs 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…

Multi-Earth Shape Views

…and you can choose from four color schemes: Classic, Subtle, Antique, and Black & White.

Multi-Earth Shape Color Schemes

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.

Multi-Earth Shape Dual Mode Configuration

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!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
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 9561 times – 103.00 B
  • Tweet
  • More
  • Pocket
  • Share on Tumblr
  • Print
  • Email

Related posts:

  1. The Hidden World of Visio Shapes
  2. European Cup 2008 Auto-Updating Visio Diagram
  3. European Cup 2008 Auto-Updating Visio Diagram (v2)
  4. Microsoft Exchange Server 2007 Stencil
  5. Visio Circle Arrows 2013

Filed Under: Maps & Geography, Shapes Tagged With: Code, Hidden, Multi-shapes, Polyline, Programming, Right-Click Actions, SmartShapes, World

Previous Post: « Sales Force Automation With Visio
Next Post: VB Visio Drawing »

Reader Interactions

Comments

  1. Kevin Wyman says

    August 23, 2007 at 4:58 pm

    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.

  2. Visio Guy says

    August 30, 2007 at 2:48 am

    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

  3. Visio Guy says

    August 30, 2007 at 2:49 am

    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/

  4. Quintin Thom says

    December 2, 2007 at 11:16 am

    Really like your site. Where I can obtain/buy your some of your shapes, I really like these world maps. Yrs Quintin

  5. Visio Guy says

    October 26, 2010 at 9:57 am

    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.

Leave a Reply Cancel reply

Primary Sidebar

Buy Über Bubble Revision Shape
Purchase

Categories

Buy my book!

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tag Cloud

A/V Artistic Effects BPM Code Connectors Control Handles Countries Custom Patterns Custom Properties Data Graphics Data Linking Data Visualization David Edson David Parker Fill Format Formulas Functions Geometry Gradient Images Links Maps Multi-shapes Network Programming repeating shapes Resources Right-Click Actions Scale Shape Data ShapeSheet ShapeSheet Formulas ShapeSheet Functions SharePoint shiny SmartShapes Sport Sports Text Themes Tools Transparency User-defined Cells Visio 2007 Visio SmartShapes

Top Posts & Pages

  • - Visio Shapes & Stencils
  • - Visio Templates & Drawings
  • Sankey Diagram Shapes for Visio
  • Bubble Revision Shapes
  • Dynamic Updating Org Charts in Visio!
  • Text Along a Connector's Path in Microsoft Visio 2010
  • Visio Network Server Shape Icon Customization Tool
  • Amazon AWS Visio Shapes
  • Audio Visual Components Shapes
  • Go 3D with Free Isometric Piping Shapes for Visio

www.visguy.com - Visio Guy - since 2006