SetDescription
设置文档描述。
语法
expression.SetDescription(sDescription);
expression - 表示 ApiCore 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| sDescription | 必需 | string | 文档描述。 |
返回值
此方法不返回任何数据。
示例
在文档的核心属性中写入描述性摘要。
// How do I add a description to a document's built-in metadata in a document?
// Provide context about a document's purpose by saving a plain-text summary in its properties in a document.
const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetDescription("This is a sample document made to help fellow users understand how to use the ApiCore methods.");
const description = core.GetDescription();
let paragraph = doc.GetElement(0);
paragraph.AddText("Description: " + description);