RotationX 属性

       

以度为单位返回或设置具有延伸的图形绕 X 轴的转角。可为 -90 到 90 之间的值。正值表示向上旋转,负值表示向下旋转。Single 类型,可读写。

expression.RotationX

expression   必需。该表达式返回“应用于”列表中的对象之一。

说明

若要设置具有延伸的图形绕 Y 轴的转角,可用 ThreeDFormat 对象的 RotationY 属性。若要设置具有延伸的图形绕 Z-轴的转角,可用 Shape 对象的 Rotation 属性。若要更改延伸方向而不旋转延伸的前表面,可用 SetExtrusionDirection 方法。

示例

本示例向 myDocument 中添加三个相同的具有延伸的椭圆,并分别将这三个椭圆绕 X 轴的转角设置为 -30 度、0 度和 30 度。

Set myDocument = Worksheets(1)
With myDocument.Shapes
    With .AddShape(msoShapeOval, 30, 30, 50, 25).ThreeD
        .Visible = True
        .RotationX = -30
    End With
    With .AddShape(msoShapeOval, 30, 70, 50, 25).ThreeD
        .Visible = True
        .RotationX = 0
    End With
    With .AddShape(msoShapeOval, 30, 110, 50, 25).ThreeD
        .Visible = True
        .RotationX = 30
    End With
End With