DbComment (对象)
说明
DbComment对象的属性和方法可以用来操作该条评论。
方法
属性
浏览器环境示例
javascript
async function example() {
await instance.ready();
const app = instance.Application;
const recordComment = await app.ActiveView.RecordComments.Item(1)
recordComment.Add("Hello World")
const count = recordComment.Count
for (let i = 1; i <= count; i++) {
const comment = await recordComment.Item(i)
console.log(await comment.Id)
console.log(await comment.Text)
}
}
脚本编辑器 示例
javascript
function main() {
const recordComment = ActiveView.RecordComments.Item(1)
recordComment.Add("Hello World")
const count = recordComment.Count
for (let i = 1; i <= count; i++) {
const comment = recordComment.Item(i)
console.log(comment.Text)
}
}
main()