首页/ 接口索引/ 效果

shape.CreateExtrude(Depth)

立体化:给平面形状拉出厚度,做 3D 字、立体包装盒。深度越大拉得越远。

签名

shape.CreateExtrude(Depth)

说明

立体化:给平面形状拉出厚度,做 3D 字、立体包装盒。深度越大拉得越远。

Python 示例(可直接运行)

依赖 pywin32。示例假定 app / doc / page / layer 已就绪。 见「连接与初始化」
Python
shape = app.ActiveSelectionRange(1)

try:
    eff = shape.CreateExtrude(1.0)                  # 1.0 = 立体深度
    print("立体化已完成,效果类型:", eff.Type)
except Exception as e:
    print("立体化失败:", e)

关于本类:效果

这一块在 VBA 里是被包装过的:Shape 上有 CreateXxx 系列方法,调用后返回一个 Effect 对象,具体参数再去 Effect 的 Blend / Contour / DropShadow / Extrude / Lens / Envelope / Perspective / Distortion 子对象上改。

同类其他接口