3 4
Developing Microsoft Visio Solutions is a complete guide to creating solutions with Microsoft Visio. This guide presents:
This Preface defines the guide's audience and conventions, introduces the top new features of interest to solution developers, and points to key online reference materials.
Developing Microsoft Visio Solutions provides assistance for anyone who wants to customize Microsoft Visio shapes or solutions, including application developers, systems analysts, programmers, architects, engineers, and users of computer-aided design (CAD) programs.
We assume you are already familiar with drawing techniques and with the Visio menus, tools, and commands. We also assume a high-school level knowledge of basic geometry and Cartesian coordinate systems. An understanding of transformations, trigonometry, and analytic geometry can also be helpful.
In the chapters that discuss controlling Visio with another programming language such as Microsoft Visual Basic for Applications (VBA) or C++, we assume you are familiar with the programming language you'll be using. Most of the examples in this book are written using VBA.
This guide uses the following typographical conventions.
Typographical convention | Description |
Bold | Programming terms in text. |
Italic | Variables in text, formulas in text, or terms defined in text. In syntax, italic letters indicate placeholders for information you supply. |
EmbeddedCaps | Capitalization for readability in Visio and VBA. Language terms are not case-sensitive in Visio or VBA, but they are case-sensitive in C++ and XML (Extensible Markup Language). |
Title Caps | File names in text. |
Monospace font | Code examples. |
To enhance the readability of formula and code samples, these conventions are followed:
Microsoft Visio provides a powerful single platform for your custom drawing solutions. The new features and improvements in Microsoft Visio 2002 give you more options for defining the behavior of the elements in your solutions.
For details on new ShapeSheet cells and Automation events, methods, objects, and properties that have been added in Microsoft Visio 2002, see the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference).
New features in Microsoft Visio 2002 for developers
Feature | Description |
Object model changes that support new and improved Visio features | Experience more complete access to persisted document data and better access to a variety of commonly used areas in Visio with more than 90 new properties and methods in the Visio 2002 object model. |
Native XML file format | Share your Visio drawings with a full-fidelity, XML-based, alternative file format. Based on Extensible Markup Language (XML) syntax, XML for Visio enables a more open exchange of Visio data with other applications. |
Storage of XML data for solutions | Store well-formed, solution-specific XML data within your Visio documents. Your XML data can be associated with a document as a whole or stored in individual ShapeSheet cells. |
Component Object Model (COM) add-in support | Develop Visio solutions using the new COM add-in technology that is available to many of the Microsoft Office applications. |
Access to the command bar object model | Customize and create menus and toolbars in Visio using the command bar object model that is shared by all Microsoft Office applications. |
Event filters | Use event filters to tailor the events you listen to, and prevent many of the events you don't want to hear from firing. |
Digital signatures | Identify your VBA project code as a trusted source by digitally signing it. |
New ShapeSheet cells and values | Use new cells to add transparency to any color attribute, set more concise glue type and behavior, set connectors as smooth curves, or flip shapes during placement. Set new values for more control in connected diagram solutions and for currencies. |
Drop-down lists for ShapeSheet cells | Select values from drop-down lists in ShapeSheet cells that have a constant set of valid values. |
GDI Plus for better graphic rendering and handling of file formats | Build graphically rich applications, manage raster image formats and metadata, and improve text readability with GDI Plus. Includes native support for JPEG, PNG, GIF, BMP, TIFF, EMF, and WMF files. |
32-bit color and transparency | Take advantage of the ability to use over 16 million colors in this 32-bit color drawing environment. Produce professional-quality drawings when you add transparency, shadows, and semi-transparent objects to your documents. |
Improved in-place behavior | Visio drawings embedded in other applications now run identically to drawings in the Visio application. |
Ability to host add-ons inside of Visio windows | Support simultaneous docking of anchored windows, add-on windows, and stencils inside your Visio 2002 window. Windows can be docked or merged at the same time, and resized to suit your application. |
Microsoft Visual Basic for Applications version 6.3 | Use the same version of VBA as Microsoft Office XP. |
For more details on features that are not discussed in this guide, see documentation updates and technical articles on the Microsoft Visio Developer Center on the MSDN Web site (msdn.microsoft.com/visio/).
Microsoft Visio 2002 includes a detailed Developer Reference with information on Visio Automation objects, methods, properties, and events and ShapeSheet sections, rows, cells, and functions. The Microsoft Visio Developer Reference is available from the Help menu in Visio (on the Help menu, click Developer Reference).
You can find shape samples and code on the Developing Microsoft Visio Solutions CD that is provided with this guide. Additional, related developer reference materials are on the Microsoft Visio Developer Center on the MSDN Web site (msdn.microsoft.com/visio/).
Besides an electronic copy of this guide, you can find reference information, samples, and code on the Developing Microsoft Visio Solutions CD that correspond to each chapter in the guide.
Here's an overview of what is on the Developing Microsoft Visio Solutions CD:
The Microsoft Visio Developer Center on the MSDN Web site (msdn.microsoft.com/visio/) contains current information for developers who are developing custom solutions for Visio, such as:
Point your browser to msdn.microsoft.com/visio/ to access the Microsoft Visio Developer Center.