删除评论
RecordComment.Delete(方法)
说明
删除评论
语法
表达式.Delete()
表达式:RecordComment
参数
参数名 | 是否必需 | 类型 | 描述 |
---|---|---|---|
Index | 是 | Number/String | 删除记录的索引 |
返回值
ApiResult
jsApi 示例
javascript
async function example() {
await instance.ready();
const app = instance.Application;
const recordComment = await app.ActiveView.RecordComments.Item(1)
const count = await recordComment.Count
for (let i = 1; i <= count; i++) {
await recordComment.Delete(i)
}
}
脚本编辑器 示例
javascript
function main() {
const recordComment = ActiveView.RecordComments(1)
const count = recordComment.Count
for (let i = 1; i <= count; i++) {
await recordComment.Delete(i)
}
}
main()