• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL



Epistle to Davie

               The honest heart that's free frae a'
                    Intended fraud or guile,
                 However Fortune kick the ba',
                  Has ay some cause to smile;

—Robert Burns, January 1785

Visio. When most folks hear that word or are asked, “Do you know about Visio?,” they respond, “Oh, yes, Visio. Isn't that the program for making those flow charts and org charts?” Well, yes, Visio is indeed a flow-charting and org-charting tool—but it is much more. Visio is a graphics application that joins graphical symbology and images with data from many data sources and produces diagrams that convey information in a clear format that is highly useful. This sounds grand, but are the solutions contained in the box and listed in the associated copy all there is to Visio? Actually, there is much more to Visio! Brilliant solutions can be accomplished if the user or developer is willing to work just a small distance “beyond the box,” which is why you have chosen this book in the first place, isn't it?

What's New in Visio 2000 for Developers

For the shape developer, there are now cross-container references. This new feature allows Visio ShapeSheet formulas to reference any cell in a document, which includes cells in pages, masters, styles, and the document ShapeSheet. There are now rotating foreign objects. This capability allows the creation of complex, multiformat shapes to be used in places where they have to be rotated. Using bitmaps, metafiles, and OLE objects for Visio shapes that do not have to exhibit smart behavior can increase the performance of your solution.

In Visio 2000, groups can now exhibit the following behavior:

  • Group shapes may contain text and/or geometry.

  • There are now three distinct group selection modes (group only, group first, member first).

  • Snap and glue operations will selectively target group member shapes.

  • There is complete mouse editing of subselected shapes (move, size, rotate, and so on).

  • There are direct deletions of subselected shapes.

These enhancements allow Visio shape developers more control over the group's shape and subshape behavior.

For the solution developer producing drawings, there are improved undo Automation capabilities. The new undo capabilities for Visio 2000 give the Visio solution developer more control over how his or her add-ons work with the Undo Manager.

Visio 2000 includes new Automation methods and events. These new methods and events add to the underlying object model to provide easier access and more complete control of the Visio drawing model.

New Automation objects include hyperlinks. The Hyperlinks object represents a collection of hyperlink objects. The MasterShortCut object is simply another kind of Stencil object. MasterShortCuts look and behave very much like a master in Visio but are only a reference to a master that may reside in a completely different Stencil.

Visio 2000 now has the capability to access cells within masters, styles, the document ShapeSheet, and other pages.

GETVAL and GETREF functions allow a ShapeSheet cell to see either the value or a formula in any other cell.

New ShapeSheet cells include new group shape cells, new shape cells, and new page cells.

Group behavior has been significantly enhanced. In Visio 2000, a group shape can now have geometry. You can add geometry to a group shape by selecting a drawing tool (Pencil, Freeform, Line, Arc, Rectangle, Ellipse), selecting the shape to add to, holding down the Ctrl+Shift keys, and gesturing in new geometry. You can also add a geometry section to a group via the group ShapeSheet window. In Visio 2000, the group shape now has the option to contain text. You can set and unset this option via the Behavior dialog box, Format, Behavior, or by setting the Group Properties text edit target cell, IsTextEditTarget, to either TRUE or FALSE.

Visio 2000 has three types of group selection behavior:

  • Group only—No subselection

  • Group first, then group member—Visio 5.0 behavior

  • Group member first, then group—Direct selection of group members

You can set a group's selection mode via the Behavior dialog box, Format > Behavior, or by setting the Group Properties group selection mode cell, SelectMode, to one of the following values: 0 = Group Only, 1 = Group First, or 2 = Member First.

In Visio 2000, group shapes may contain visible components such as text or geometry. You can set a group's display via the Behavior dialog box, Format > Behavior, or by setting the Group Properties group data display cell, DisplayMode, to one of the following values: 0 = Hide, 1 = Behind member shapes, or 2 = In front of member shapes.

There are numerous geometry functions new in Visio 2000. These include







There are numerous sheet property functions new in Visio 2000. These include

  • Name

  • MasterName

  • BkgPageName

  • Data1, Data2, and Data3

  • Type

  • TypeDes

  • ID

  • FieldPicture

There are numerous document property functions new in Visio 2000. These include

  • Directory

  • Filename

  • DocCreation

  • DocLastPrint

  • DocLastSave

  • Creator

  • Description

  • Keywords

  • Subject

  • Title

  • Manager

  • Manager

  • Category

  • HyperlinkBase

The new page tab control in Visio provides a simple, intuitive means of managing drawing pages in the Visio environment. The page tab control is located along the bottom edge of the drawing window and resembles the paper index tabs that are attached to pages in a volume.

This new control offers a simple way to reorder and rename pages in Visio. To reorder pages, drag and drop a tab into its new position. You can rename a page by right-clicking a tab and selecting Rename from the right-click menu. The text in the tab will become selected, and a text caret will begin flashing at the end of the text. When this occurs, you may retype or edit the name in the tab.

Visio 2000 now offers the capability to “nudge” selected objects to the nearest snappable point or pixel. Nudging means to move a shape by tapping an arrow key while the shape is selected. In Visio, nudging shapes can be most useful when you're fine-tuning the position of your shape on the Visio drawing page.

When you use the navigation keys to nudge your selection, the shapes in your selection will automatically snap to the nearest snappable point, as defined by the Snap and Glue dialog box. You can dictate your Snap and Glue settings in the Snap and Glue dialog box by selecting Tools, Snap and Glue from the Visio menu. If you have to move your selection one pixel at a time, hold down the Shift key and use the navigation keys to move your shape, pixel by pixel. You can enable nudging in Visio by turning off the Scroll Lock.

The new modeless Pan and Zoom window was designed to help you quickly survey a diagram and dive down into the specific areas of interest. You can display the Pan and Zoom window from the menu by selecting View, Windows, Pan and Zoom. Depending on your personal preference, the Pan and Zoom window can anchor itself to one or two inner edges in your Visio drawing window, or it can float as a popup window. When anchored, the Pan and Zoom window can optionally slide out of view when the cursor leaves the window and then slide back into view when the cursor hovers over the collapsed window. When the window is floating, you can control the size and position of this window in your drawing.

The bold rectangle inside the Pan and Zoom window represents the current viewable area of the drawing window. To pan the drawing window to a new location, click and drag the rectangle to a new location on the page. You can zoom to a section of the drawing by clicking and dragging out a new view region, which will zoom the drawing window to fit the new rectangle.

The new Document Explorer window provides a central location where you can easily explore and manage the contents of your Visio document. You can display the Document Explorer by selecting View, Windows, Document Explorer from the Visio menu. Again, depending on your personal preference, the Document Explorer can anchor itself to one or two inner edges in the document window, or it can float as a popup window. (For more information on anchored and floating windows, see the preceding Pan and Zoom description.)

When you open the Document Explorer, you will find the contents of the document displayed in a hierarchical fashion. You can expand or collapse folders by double-clicking on the folder. The text of each item can be edited by single-clicking on the item and then hovering your cursor over the item to invoke the text editor.

Each item in the Document Explorer has a menu associated with it. To invoke this menu, right-click on the item you want to work.

The Size and Position dialog has been designed to include a new modeless window that helps you size and position shapes in an exact manner. You can display the new Size and Position window by selecting View, Windows, Size and Position from the Visio menu. Depending on your personal preference, the Size and Position window can anchor itself to one or two inner edges in your Visio drawing window, or it can float as a popup window.

Visio 2000 now includes a new modeless Custom Properties window. You can display the Custom Properties window by selecting View, Windows, Custom Properties from the Visio menu. Depending on your personal preference, the Custom Properties window can anchor itself to one or two inner edges in your Visio drawing window, or it can float as a popup window.

With the new Custom Properties window, you can select single or multiple shapes to display their custom properties in the modeless Custom Properties window. When a single shape is selected, the selected shape's properties and values are displayed in the window. When you select multiple shapes, only the custom properties common to the selected shapes are displayed in the Custom Properties widow. If the value of a custom property row has been visually truncated in the dialog box, hold your cursor over the value grid to see a ScreenTip that shows the entire contents of your value cell. You can also display a custom property row prompt by placing your cursor over the property description cell.

Shortcuts to masters are similar to file shortcuts in Windows. They look and behave very much like a master in Visio but are only a reference to a master that may reside in a completely different Stencil. There are a number of benefits to using shortcuts to masters rather than duplicating the original master. They include

  • By referencing masters that appear in more than one Stencil, you can begin to create smaller Stencils.

  • By referencing masters that appear in more than one Stencil, you can easily apply fixes and enhancements in just one place, rather than have to track down and update each duplicate copy.

Because each shortcut can contain its own “state data,” which is applied to the shape at drop time, you can create several shortcuts to the same master and produce very different effects when dropped on the same page.

CommandBars are the fusion of toolbars, menu bars, and popup menus into a single control type. A CommandBar is a window that contains a series of buttons or other controls, such as combo boxes and edit fields. A CommandBar may be docked at the edge of a frame window, or it may float over the desktop. CommandBars can be in one of three styles:

  • Toolbar style—Controls are arranged horizontally. Buttons are displayed without text, but with an icon.

  • Menu bar style—Controls are arranged horizontally. Buttons are displayed with text, but without an icon.

  • Popup menu style—Controls are arranged vertically. Buttons are displayed with text and with icons, if available.

In Visio 2000, you may now customize existing CommandBars or create new CommandBars with the help of a new Visio customization interface. To customize a CommandBar, right-click anywhere on a CommandBar object and select Customize to receive the customization dialog box. This new modeless dialog box provides a palette of controls that may be dragged and dropped onto the showing CommandBars. While you are in the Customize mode, you may also select which CommandBars are shown or hidden and create and name new CommandBars.

In Visio 2000, a shape's begin and end points can now have different line-end sizes. They can be set in the Format Line dialog; Format, Line from the menu; and in the Line Format section of the ShapeSheet window. The cell names for begin and end arrow sizes are BeginArrowSize and EndArrowSize.

To better support engineering, Visio 2000 now supports multidimensional units. Multidimensional units can be added to ShapeSheet formulas by using a caret (^) character after an explicit unit followed by an exponent. For example, 4in^2 would denote 4 square inches; a ShapeSheet formula such as 2 in * 6 in + 5in^2 would return 17in^2, or 17 square inches. The exponent sign can be represented by nothing, indicating a positive value, or a single minus (-) character, indicating a negative value.

To support the exchange of image data with other applications, the Icon Editor has been enhanced to use the standard Windows bitmap format. This new feature allows the Cut, Copy, and Paste Clipboard commands to interact with other Windows bitmaps.

What You Should Know Before Reading This Book

This book makes two basic presumptions. First, it presumes that you have at least a passing acquaintance with using the Visio user interface. You can “drag, drop, and pull-on-the-green-things.” You can move SmartShape symbols around on a page and connect them as necessary to create simple connected diagrams. Second, it presumes that you have a…and here you will forgive the pun…basic understanding of Visual Basic and/or VBA within at least one Microsoft Office application: Word, Excel, Access, PowerPoint, or Outlook.

How This Book Is Organized

This book is organized into four general parts. Each is designed to assist you in your learning process when working with Visio solutions development.

Part I: Visio Development with ShapeSheets

The first chapter is designed to acquaint you with the Visio ShapeSheet and Automation paradigms. It introduces you to the Visio SmartShape symbols and their inherent ShapeSheets.

The next nine chapters effect your total immersion into the ShapeSheet programming environment. In these chapters, you will learn about virtually every cell in a Visio ShapeSheet. You will learn how to set and retrieve values and formulas and use them to reference and manipulate other cells. In this manner, you create specialized behavior that is the hallmark of SmartShape symbol development.

Part II: Visio ActiveX Development

The five chapters that follow the ShapeSheet development section deal with enhanced access to every aspect of the Visio environment through ActiveX Automation. This includes manipulating Visio SmartShape symbols, Visio pages and drawings, and even the Visio user interface.

Part III: Visio Development with Microsoft Office 2000 and Other VBA-Enabled Applications

In the last seven chapters, you will learn how to interact with other VBA-enabled applications, such as all the Microsoft Office 2000 applications—Excel, Access, Word, PowerPoint, and Outlook.

About the CD

This book comes with a companion CD-ROM that contains the following:

  • A fully functional evaluation copy of Visio 2000 Professional Edition. This software is a time-expiring version of Visio that is identical to a full license version. It simply times out after 30 days.

  • Every Visio 2000 drawing file used to create the examples in this book. You are free to open each drawing and use any of the SmartShape symbols and any code used in these diagrams. Remember that there is no such thing as stealing code here. It is “adaptive reuse”!

  • Numerous other example files and whitepapers to assist you in your development efforts.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint