Skip to main content

ModelCenter APIs 2025 R2

toFormattedString

Last update: 16.07.2025

public toFormattedString(): String

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

Return

the formatted string value of the variable

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