functionconstructor

Verify whether a file writer with the same path exists and cache variable keys

Extends from Modelica.Icons.Function (Icon for functions).

Information

Creates an empty file with name fileName. If fileName is used in another instance of Buildings.Utilities.IO.Files.CSVWriter, the simulation stops with an error.

Inputs

TypeNameDefaultDescription
StringinstanceNameInstance name of the file write
StringfileNameName of the file, including extension
BooleandumpAtDestruction=true, to write cached values at destruction
StringvarKeysKeys for values that are written to file

Outputs

TypeNameDefaultDescription
JSONWriterObjectjsonWriterPointer to the file writer

Revisions

  • September 4, 2026, by Michael Wetter:
    Corrected signature in C-code for string array.
    This is for IBPSA, #2166.