首页/ 接口索引/ Page 页面对象

page.FindShapes(query, type, recursive)

页内查找,用法同 Layer.FindShapes。

签名

page.FindShapes(query, type, recursive)

说明

页内查找,用法同 Layer.FindShapes。

Python 示例(可直接运行)

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

texts = page.FindShapes("", 6, True)     # 6=文字,True=递归穿透群组
print("本页文字数:", texts.Count)

for i in range(1, texts.Count + 1):
    print("内容:", texts.Item(i).Text.Contents)

关于本类:Page 页面对象

页面尺寸、当前图层、页内查找。CDR 坐标原点在<b>页面左下角</b>,Y 轴向上。

同类其他接口