1. String Variable

A string variable is used to parameterize a text value in the model, typically a file path. The variable can be referenced from model properties and varied across conditions in parameter studies.

  • Value: The default value of the variable (text string).

  • Structured: When checked, the value is parsed as JSON and exposed to scripts as an object instead of a plain text string. Use this to group related parameters into a single variable.

You can assign a string variable to a string field by using the Set script pop-up menu item or clicking Ctrl+2 in the field.
In the condition editor you can assign values to this string variable.

1.1. Structured (JSON) string variables

When Structured is enabled, the Value field is interpreted as a JSON document. Scripts can then reach into the document with normal dot and bracket notation — myVar.x, myVar.points[0].name, and so on — rather than treating the value as a single opaque string.

This is useful when several parameters belong together (a named point with coordinates, a tuple of options, a list of phases) and you want to vary them as one unit across conditions.

If the JSON is invalid, the offending line is underlined in the editor and an error is reported on the variable. Hover over the underlined line to see the parser message.

1.1.1. Example

Create a string variable pos with Structured checked and the following value:

{
  "x": 133.6,
  "y": -44.0,
  "z": -13.8
}

You can then drive three separate fields from this single variable using Set script (Ctrl+2):

  • pos.x

  • pos.y

  • pos.z

Changing any number in the JSON updates all three fields. To vary them across conditions, set a different JSON value for pos in each condition.

See Variables and Scripting for more information on how to use variables.