Chapter 16, Working with Visio Document, Page, and Shape Objects

Chapter 16, Working with Visio Document, Page, and Shape Objects

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.

In the Microsoft® Visio® object model, the most fundamental object you work with is the Shape object. To navigate to the Shape objects, you commonly work with the Document and Page objects that precede them in the object hierarchy.

This chapter describes techniques for working with Document, Page, and Shape objects—getting and setting their properties, and invoking their methods. You can apply many of these techniques when working with other Visio objects in the object model.

For details about these objects or any objects, properties, methods, and events in the Visio object model, see the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference). For a summary list of Visio objects, properties, methods, and events, see Appendix A, Properties, Methods, and Events by Object.

Note Beginning with Visio 2000, any object that can be assigned a name (for example, a page or a shape) can have two names: a local name and a universal name. If you are developing solutions that will be localized, see Using Universal Names in Your Solution in Chapter 26, Packaging a Visio Automation Solution.

In this chapter…

Working with Document Objects

Working with Page Objects

Working with Shape Objects

Creating a Simple Drawing: an Example