Table of contents
TOC
Collapse the table of content
Expand the table of content

Selection.Flip Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Flips selected shapes either as a group or individually about their pins. Returns Nothing .

Syntax

expression . Flip( FlipDirection , FlipType , BlastGuards , PinX , PinY , PinUnitsNameOrCode )

expression A variable that represents a Selection object.

Parameters

NameRequired/OptionalData TypeDescription
FlipDirectionRequiredVisFlipDirectionSpecifies the direction in which to flip the selection. See Remarks for possible values.
FlipTypeOptionalVisFlipTypesSpecifes how selection is to be flipped. See Remarks for possible values.
BlastGuardsOptionalBooleanTrue 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 .
PinXOptionalDoubleWhen FlipType is visFlipSelectionWithPin , specifies the X-position of the pin about which the selection is to be flipped.
PinYOptionalDoubleWhen FlipType is visFlipSelectionWithPin , specifies the Y-position of the pin about which the selection is to be flipped.
PinUnitsNameOrCodeOptionalVariantSpecifies 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.

ConstantValueDescription
visFlipHorizontal1Flip the selection horizontally.
visFlipVertical2Flip the selection vertically.

The following possible values for FlipType are declared in VisFlipTypes in the Visio type library.

ConstantValueDescription
visFlipSelectionWithPin1Flip the selection about a pin.
visFlipSelection0Flip the selection about its center.
visFlipShapes2Flip 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.

Public Sub Flip_Example() 

 Dim vsoShape1 As Visio.Shape 
 Dim vsoShape2 As Visio.Shape 


 Set vsoShape1 = Application.ActiveWindow.Page.DrawRectangle(1, 9, 3, 7) 
 Set vsoShape2 = Application.ActiveWindow.Page.DrawRectangle(3, 6, 5, 5) 

 ActiveWindow.DeselectAll 

 ActiveWindow.Select vsoShape1, visSelect 
 ActiveWindow.Select vsoShape2, visSelect 


 Application.ActiveWindow.Selection.Flip visFlipHorizontal, visFlipSelection, False 

End Sub
© 2017 Microsoft