Evaluate template string used by graph object.
Number | Type | Compulsory | Default | Description |
---|---|---|---|---|
1 |
string |
Yes |
|
Graph object ID |
2 |
string |
Yes |
|
Template |
3 |
string |
No |
|
Options |
ID of graph object whose properties are to be used in the template. See Graph Object Identifiers - the 'ID'.
Template string. This can consist of literal text, properties enclosed with '%' and expressions enclosed with '{' and '}'. The property values are those belong to the object supplied in argument 1. Properties available for the various types of graph object are described in Objects and Their Properties. Some properties return the id of another graph object. These can be used to create nested property definitions. For example %curve:label% when applied to a curve marker object returns the label of the attached curve.
The template string may also contain the special keywords <if> , <ifd> , <t> and <repeat> . These behave the same and have identical syntax as the keywords of the same name used for schematic TEMPLATE properties described in the User's Manual .
Options. Currently there is only 1 and that is the action to take when an expression fails to evaluate. Possible values are:
'msg' | Requires a second arg 3 to have two elements. Returns error message specified in second element of string. |
'empty' | Returns an empty value on error |
'literal' | (default) Returns the literal text of the expression |
Return type: string
Returns the result of evaluating the template.
|