Variables
Variables
Section titled “Variables”app.activeDocument.variables
Description
Section titled “Description”The collection of Variable objects in the document.
For an example of how to create variables, see Using variables and datasets.
Properties
Section titled “Properties”Variables.length
Section titled “Variables.length”app.activeDocument.variables.length
Description
Section titled “Description”The number of variables in the document
Number; read-only.
Variables.parent
Section titled “Variables.parent”app.activeDocument.variables.parent
Description
Section titled “Description”The object that contains the collection of variables
Object; read-only.
Variables.typename
Section titled “Variables.typename”app.activeDocument.variables.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
Methods
Section titled “Methods”Variables.add()
Section titled “Variables.add()”app.activeDocument.variables.add()
Description
Section titled “Description”Adds a new variable to the collection.
Returns
Section titled “Returns”Variables.getByName()
Section titled “Variables.getByName()”app.activeDocument.variables.getByName(name)
Description
Section titled “Description”Get the first element in the collection with the provided name.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | Name of element to get |
Returns
Section titled “Returns”Variables.index()
Section titled “Variables.index()”app.activeDocument.variables.index(itemKey)
Description
Section titled “Description”Gets an element from the collection.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
itemKey | String, Number | String or number key |
Returns
Section titled “Returns”Variables.removeAll()
Section titled “Variables.removeAll()”app.activeDocument.variables.removeAll()
Description
Section titled “Description”Deletes all elements in this collection.
Returns
Section titled “Returns”Nothing.