Chapter 17, Automating Formulas

Chapter 17, Automating Formulas

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 addition to the properties that are exposed in the Microsoft® Visio® object model, you can control Shape, Style, Page, Master, and Document objects by working with the formulas that are contained in Cell objects. Just as you can view, enter, and edit formulas in cells in a ShapeSheet® window, you can get and set formulas contained in the Cell objects that belong to a shape. For this reason, it is essential for an Automation developer to understand the functionality that the Visio engine provides with its SmartShapes® technology. Anything you can do with a formula in a ShapeSheet window you can also do in your program.

You can alter a shape even more dramatically by working with whole sections and rows of its formulas. For example, you can add Geometry sections, delete vertices, or change the row type of segments, converting them from lines to arcs or arcs to lines.

Important For a complete list of sections, cell reference names, and section, row, and cell index constants, see Appendix B, ShapeSheet Section, Row, and Cell Indices. You can also find index constants and their values by searching the Visio type library for VisSectionIndices, VisRowIndices, and VisCellIndices.

This chapter introduces you to automating formulas of Cell objects that belong to Shape, Style, Page, Master, and Document objects. It also discusses working with sections and rows from your program. For more information about working with Visio formulas, see Chapter 4, Visio Formulas.

In this chapter�

Working with Formulas in Cells

Working with Sections and Rows

Working with Inherited Data