变量
app.activeDocument.variables
文档中 Variable 对象的集合。
有关如何创建变量的示例,请参阅 使用变量和数据集。
Variables.length
Section titled “Variables.length”app.activeDocument.variables.length
文档中变量的数量
数字;只读。
Variables.parent
Section titled “Variables.parent”app.activeDocument.variables.parent
包含变量集合的对象
对象;只读。
Variables.typename
Section titled “Variables.typename”app.activeDocument.variables.typename
引用对象的类名。
字符串;只读。
Variables.add()
Section titled “Variables.add()”app.activeDocument.variables.add()
向集合中添加一个新变量。
Variables.getByName()
Section titled “Variables.getByName()”app.activeDocument.variables.getByName(name)
获取集合中具有指定名称的第一个元素。
参数 | 类型 | 描述 |
---|---|---|
name | 字符串 | 要获取的元素的名称 |
Variables.index()
Section titled “Variables.index()”app.activeDocument.variables.index(itemKey)
从集合中获取一个元素。
参数 | 类型 | 描述 |
---|---|---|
itemKey | 字符串, 数字 | 字符串或数字键 |
Variables.removeAll()
Section titled “Variables.removeAll()”app.activeDocument.variables.removeAll()
删除此集合中的所有元素。
无。