Skip to content
本页内容

RotationY (属性)

以度为单位返回或设置具有延伸的形状绕 y 轴的转角。取值范围在 -90 到 90 之间。正值表示向左旋转,负值表示向右旋转。Single 类型,可读/写。

说明

要设置具有延伸的形状绕 x 轴的旋转量,请使用 ThreeDFormat 对象的 RotationX 属性。要设置具有延伸的形状绕 z 轴的旋转量,请使用 Shape 对象的 Rotation 属性。要更改延伸的弯路径的方向而不旋转延伸的正面,请使用 SetExtrusionDirection 方法。

示例

python
#本示例向第一张工作表中添加三个相同的具有延伸的椭圆,并分别将这三个椭圆绕 y 轴的转角设置为 -30 度、0 度和 30 度
def test():
    worksheet = Worksheets.Item(1)
    shapes = worksheet.Shapes
    threeDFormat1 = shapes.AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD
    threeDFormat1.Visible = msoTrue
    threeDFormat1.RotationY = -30
    threeDFormat2 = shapes.AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD
    threeDFormat2.Visible = msoTrue
    threeDFormat2.RotationY = 0
    threeDFormat3 = shapes.AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD
    threeDFormat3.Visible = msoTrue
    threeDFormat3.RotationY = 30
python
#本示例显示活动工作表中第二个延伸形状绕 y 轴旋转的度数
def test():
    shape = ActiveSheet.Shapes.Item(2)
    print(shape.ThreeD.RotationY)