Selection.Trim Method
Visio Automation Reference |
Trims selected shapes into smaller shapes.
Version Information
Version Added: Visio 4.1
Syntax
expression.Trim
expression A variable that represents a Selection object.
Return Value
Nothing
Remarks
Using the Trim method is equivalent to clicking Trim on the Operations submenu of the Shape menu in Microsoft Office 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, taking overlap into account.
- Shapes produced by the Fragment method coincide with the distinct regions of the selected shapes, also taking overlap into account.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Trim method to trim selected shapes into smaller shapes along their intersections.
Visual Basic for Applications |
---|
|
See Also