Share via


Working with geometry in XML for Visio

Working with geometry in XML for Visio

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.

All ShapeSheet sections are implied in the XML for Visio file format with the exception of Geometry sections. This is because, unlike other ShapeSheet sections, more than one Geometry section can exist in a ShapeSheet spreadsheet.

The elements that represent rows in the Geometry section of the ShapeSheet—for example, MoveTo or LineTo elements—are children of the Geom element.

Geom elements have two optional attributes:

  • The IX attribute specifying the index of the element within the parent element. The value of the IX attribute in geoetry elements is one-based.
  • The Del='1' attribute which indicates that the element has been deleted locally.

Local deletion

Just like any element that represents a sheet row or section, you can locally delete a Geom element, or any of the row elements that are children of the Geom element.

Consider the following example. The Master element contains three Geom elements, each representing a polygon:

  <Master ID='0'>
...
<Geom IX='0'> ... </Geom>
<Geom IX='1'> ... </Geom>
<Geom IX='2'> ... </Geom>
...
</Master>

When it is displayed, the master looks like the following graphic.

A Master element that contains three Geom elements, each representing a different polygon (square, circle, triangle)

The following code example demonstrates how an instance of the master can locally delete one of the Geom elements:

  <Shape ID='99' Master='0'>
...
<Geom IX='2' Del='1'>
...
</Shape>

When displayed, the instance looks like the following graphic.

An instance shape of a master with one Geom element deleted locally. Now only the square and circle remain.