Optimizing Shape Geometry

Shapes with simple geometry perform better than shapes with complex geometry. A shape with fewer rows in its Geometry section will render faster than a shape with many, and a shape with a single Geometry section will render faster than a shape with multiple Geometry sections. If you don't need to control a shape's vertices with formulas, consider simplifying its geometry. Here are some suggestions:

  • As an alternative to creating a shape with multiple paths, skip segments in a single path by converting LineTo rows into MoveTo rows. A shape's Geometry section always starts with a MoveTo row, but after the first segment, it can have as many additional MoveTo rows as needed.
  • Condense many line segments into a single PolyLineTo row. The X and Y cells of such a row define the x,y coordinates of the end point; however, a single POLYLINE formula in the row's A cell defines all of the vertices between the begin point (the X and Y cells in a prior row) and end point of the shape.
  • Any shape with more than three or four segments might perform better as a PolyLineTo row. However, it's easier to "read" a shape's geometry as a series of LineTo rows in a Geometry section rather than a series of arguments in a function. You can convert a PolyLineTo row into LineTo rows by right-clicking the row in the Geometry section and clicking
  • Expand Row
  • .
  • A POLYLINE formula can contain cell references or expressions. However, as soon as a user edits the shape with the
  • Pencil
  • tool, Microsoft® Visio® regenerates the formula, substituting constants for cell references and expressions. To prevent this, lock the shape against editing.
  • Visio creates PolyLineTo rows automatically when importing DWG files. For more information about PolyLineTo rows and POLYLINE formulas, see the Microsoft Visio Developer Reference (on the
  • Help
  • menu, click
  • Developer Reference
  • ).

Note Beginning with Visio 2000, the Freeform tool creates a nonuniform rational B-spline, or NURBS, represented by a NURBSTo row in the ShapeSheet. (A spline is a freeform curve that is based on a polynomial equation.) In versions of Visio earlier than Visio 2000, the Freeform tool created splines. Visio 2000 and later versions support spline row types (SplineStart and SplineKnot) for backward compatibility.