Chapter 14, Automation and the Visio Object Model

Chapter 14, Automation and the Visio Object Model

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Automation is the mechanism that enables you to extend the functionality of Microsoft® Visio® or to include the Visio engine as a graphics engine for your own program. With Automation, you can use the Visio engine to create or update drawings based on data from an external source, to read drawings and gather information from them, or simply to extend the behavior of a drawing with a Microsoft® Visual Basic® for Applications (VBA) macro.

This chapter describes Automation and the Visio object model—the objects that the Visio engine exposes through Automation. It shows how to access these objects from a program and briefly covers the VBA syntax for using Visio objects, properties, and methods, and includes some sample code.

For details about handling events in your program, see Chapter 21, Handling Visio Events.

For details about creating an external Microsoft® Visual Basic® program, see Chapter 27, Programming Visio with Visual Basic. For comparable information about C++ syntax, see Chapter 28, Programming Visio with C++.

In this chapter…

An Automation Overview

The Visio Object Model

Getting and Releasing Visio Objects

Using Properties and Methods