Skip to content
本页内容

ThreeDFormat (对象)

该对象代表一个形状的三维格式。

说明

不能对某些形状应用三维格式,例如斜截形状或多处间断的路径。对这些形状, ThreeDFormat 对象的大多数属性和方法将失败。

使用 ThreeD 属性可返回一个 ThreeDFormat 对象。

示例

python
#以下示例向第一张工作表添加一个椭圆,然后指定椭圆延伸至 50 磅深度,延伸为紫色
def test():
    worksheet = Worksheets.Item(1)
    shape = worksheet.Shapes.AddShape(msoShapeOval, 90, 90, 90, 40)
    threeDFormat = shape.ThreeD
    threeDFormat.Visible = True
    threeDFormat.Depth = 50
    threeDFormat.ExtrusionColor.RGB = RGB(255, 100, 255)
    #RGB value for purple
python
#本示例显示活动工作表中第三个形状突出的深度
def test():
    shapes = ActiveSheet.Shapes
    shape = shapes.Item(3)
    print(shape.ThreeD.Depth)