A text variable instance in the text.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| associatedTextVariable | TextVariable | r/w | The template for the TextVariableInstance. |
| id | number | readonly | The unique ID of the TextVariableInstance. |
| index | number | readonly | The index of the TextVariableInstance within its containing object. |
| label | string | r/w | A property that can be set to any string. |
| name | string | readonly | The name of the TextVariableInstance. |
| parent | any | readonly | The parent of the TextVariableInstance (a XmlStory, TextFrame, Story, Note, Cell, Footnote, Table, TextColumn, TextStyleRange, Text, Paragraph, Line, Word, Character or InsertionPoint). |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
| resultText | string | readonly | The text that replaces the variable marker. Note: This property cannot be set; it can be used only to update variables. . |
| storyOffset | InsertionPoint | readonly | The location of the TextVariableInstance in the parent story. |
Methods
TextconvertToText ()
Converts the footnote to part of the story text and places the converted text at the former location of the footnote reference number in the main text.
string extractLabel (key:
string)
Gets the label value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
Array of TextVariableInstancegetElements ()
Resolves the object specifier, creating an array of object references.
void insertLabel (key:
string, value:
string)
Sets the label to the value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
| value | string | The value. |
void remove ()
Deletes the TextVariableInstance.
string toSource ()
Generates a string which, if executed, will return the TextVariableInstance.
string toSpecifier ()
Retrieves the object specifier.
Element of:
TextVariable.associatedInstances
Used in:
TextVariableInstances.previousItem (
obj:
TextVariableInstance )
TextVariableInstances.nextItem (
obj:
TextVariableInstance )
Returned by:
Array of TextVariableInstance TextVariableInstance .getElements (
)
TextVariableInstance TextVariableInstances.add (
[to:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object]
)
TextVariableInstance TextVariableInstances.anyItem (
)
Array of TextVariableInstance TextVariableInstances.everyItem (
)
TextVariableInstance TextVariableInstances.firstItem (
)
TextVariableInstance TextVariableInstances.item (
index:
any
)
TextVariableInstance TextVariableInstances.itemByID (
id:
number
)
TextVariableInstance TextVariableInstances.itemByName (
name:
string
)
Array of TextVariableInstance TextVariableInstances.itemByRange (
from:
any, to:
any
)
TextVariableInstance TextVariableInstances.lastItem (
)
TextVariableInstance TextVariableInstances.middleItem (
)
TextVariableInstance TextVariableInstances.nextItem (
obj:
TextVariableInstance
)
TextVariableInstance TextVariableInstances.previousItem (
obj:
TextVariableInstance
)