Selection.Flip Method
Visio Automation Reference |
Flips selected shapes either as a group or individually about their pins. Returns Nothing.
Version Information
Version Added: Visio 2003
Syntax
expression.Flip(FlipDirection, FlipType, BlastGuards, PinX, PinY, PinUnitsNameOrCode)
expression A variable that represents a Selection object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
FlipDirection | Required | VisFlipDirection | Specifies the direction in which to flip the selection. See Remarks for possible values. |
FlipType | Optional | VisFlipTypes | Specifes how selection is to be flipped. See Remarks for possible values. |
BlastGuards | Optional | Boolean | True to override formulas in the ShapeSheet of any of the selected shapes to which the GUARD function has been applied; False to leave guarded formulas unchanged. The default is False. |
PinX | Optional | Double | When FlipType is visFlipSelectionWithPin , specifies the X-position of the pin about which the selection is to be flipped. |
PinY | Optional | Double | When FlipType is visFlipSelectionWithPin , specifies the Y-position of the pin about which the selection is to be flipped. |
PinUnitsNameOrCode | Optional | Variant | Specifies the units to use for PinX and PinY. See Remarks for possible values. The default is inches. |
Return Value
Nothing
Remarks
The following possible values for FlipDirection are declared in VisFlipDirection in the Visio type library.
Constant | Value | Description |
---|---|---|
visFlipHorizontal |
1 |
Flip the selection horizontally. |
visFlipVertical |
2 |
Flip the selection vertically. |
The following possible values for FlipType are declared in VisFlipTypes in the Visio type library.
Constant | Value | Description |
---|---|---|
visFlipSelectionWithPin |
1 |
Flip the selection about a pin. |
visFlipSelection |
0 |
Flip the selection about its center. |
visFlipShapes |
2 |
Flip the selected shapes about their pins. |
You can specify PinUnitsNameOrCode as an integer (a member of VisUnitCodes) or a string value such as "inches". If the string is invalid or the unit code is inappropriate (nontextual), an error is generated.
For a complete list of valid unit strings along with corresponding Automation constants (integer values), see About units of measure.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Flip method to flip a selection horizontally.
Visual Basic for Applications |
---|
|
See Also