Skip to main content

ModelCenter APIs 2025 R1

toString

Last update: 16.07.2025

public toString(): String

Converts the variable value to a string representation. If the variable is not currently valid, it is first validated.

Return

the string value of the variable. If the variable is an array, it will to be of the form "1, 2, 3" for one-dimensional arrays or "bounds[3,3] {1, 2, 3, 4, 5, 6, 7, 8, 9}" for multi-dimensional arrays.

Throws

RuntimeException thrown if an error occurs while trying to validate or retrieve the value of the variable. Note that this is a run time exception because Object.toString() cannot be overridden to throw an exception.

Connect with Ansys