Table of contents
TOC
折叠目录
展开目录

Selection.Flip 方法 (Visio)Selection.Flip Method (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

作为一个组或围绕旋转单独翻转选定的形状。不返回任何内容Flips selected shapes either as a group or individually about their pins. Returns Nothing .

语法Syntax

表达式翻转FlipDirectionFlipTypeBlastGuardsPinXPinY ( PinUnitsNameOrCodeexpression . Flip( FlipDirection , FlipType , BlastGuards , PinX , PinY , PinUnitsNameOrCode )

表达式_一个表示选定对象的变量。_expression A variable that represents a Selection object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
FlipDirectionFlipDirection必需RequiredVisFlipDirectionVisFlipDirection指定翻转选定形状的方向。有关可能值,请参阅“说明”。Specifies the direction in which to flip the selection. See Remarks for possible values.
FlipTypeFlipType可选OptionalVisFlipTypesVisFlipTypes指定翻转选定形状的方式。有关可能值,请参阅“说明”。Specifes how selection is to be flipped. See Remarks for possible values.
BlastGuardsBlastGuards可选OptionalBooleanBoolean要重写任何向其应用 GUARD 函数; 所选形状的 ShapeSheet 中的公式以保留保护的公式保持不变。默认值为FalseTrue 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 .
PinXPinX可选OptionalDoubleDoubleVisFlipSelectionWithPinFlipType_时,指定有关该选定内容时翻转针的 X 位置。When _FlipType is visFlipSelectionWithPin , specifies the X-position of the pin about which the selection is to be flipped.
PinYPinY可选OptionalDoubleDoubleVisFlipSelectionWithPinFlipType_时,指定有关该选定内容时翻转的 pin 的 Y 位置。When _FlipType is visFlipSelectionWithPin , specifies the Y-position of the pin about which the selection is to be flipped.
PinUnitsNameOrCodePinUnitsNameOrCode可选OptionalVariantVariant指定要用于_PinX_和_PinY_单元。有关可能值,请参见备注。默认设置为英寸。Specifies the units to use for PinX and PinY. See Remarks for possible values. The default is inches.

返回值Return Value

Nothing

注解Remarks

以下可能的值为_FlipDirection_ VisFlipDirection的 Visio 类型库中进行声明。The following possible values for FlipDirection are declared in VisFlipDirection in the Visio type library.

常量ConstantValue说明Description
visFlipHorizontalvisFlipHorizontal11水平翻转选定形状。Flip the selection horizontally.
visFlipVerticalvisFlipVertical22垂直翻转选定形状。Flip the selection vertically.

以下可能的值为_FlipType_ VisFlipTypes的 Visio 类型库中进行声明。The following possible values for FlipType are declared in VisFlipTypes in the Visio type library.

常量ConstantValue说明Description
visFlipSelectionWithPinvisFlipSelectionWithPin11沿旋转中心点翻转选定形状。Flip the selection about a pin.
visFlipSelectionvisFlipSelection00沿中心翻转选定形状。Flip the selection about its center.
visFlipShapesvisFlipShapes22沿旋转中心点翻转选定的多个形状。Flip the selected shapes about their pins.

您可以指定_PinUnitsNameOrCode_为一个整数 ( VisUnitCodes的成员) 或一个字符串值,如"厘米"。如果字符串无效或者单位代码不合适 (非文本),则会产生错误。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

(VBA) 宏此 Microsoft Visual Basic for Applications 演示如何翻转方法用于水平翻转所选内容。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
© 2018 Microsoft