Trim method

Microsoft Visio Developer Reference

Trim method

   Example   

Trims selected shapes into smaller shapes.

Version added

4.1

Syntax

object.Trim

object

Required. An expression that returns a Selection object that contains the shapes to trim.

Remarks

The Trim method is equivalent to clicking Trim on the Operations submenu on the Shape menu in Visio.

The new shapes inherit the formatting of the first selected shape, have no text, and are the topmost shapes in their container—the nth shape, nth – 1 shape, nth – 2 shape, and so forth in the Shapes collection of their containing shape, where n = count. The original shapes are deleted and no shapes are selected when the operation is complete.

The Trim method is similar to the Fragment method but differs in the following ways:

  • Shapes produced by the Trim method coincide with the distinct paths of the selected shapes, also taking overlap into account.
  • Shapes produced by the Fragment method coincide with the distinct regions of the selected shapes, taking overlap into account.