impure functiongetLastHeaderElementTMY3

Gets last element from the header of a TMY3 weather data file

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

Information

This function scans the weather data file for a line that starts with the string
start
where start is a parameter. When this line is found, the function returns the element at the position number position, where position is a parameter. A comma is used as the delimiter of the elements.

Inputs

TypeNameDefaultDescription
StringfilNamName of weather data file
StringstartStart of the string that contains the elements
StringnameName of data element, used in error reporting

Outputs

TypeNameDefaultDescription
StringelementElement at position 'pos' of the line that starts with 'start'

Revisions

  • December 11, 2021, by Michael Wetter:
    Added impure declaration for MSL 4.0.0.
  • April 21, 2016, by Michael Wetter:
    Removed call to Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath because this function calls Modelica.Utilities.Files.loadResource, which needs to be resolved at compilation time, which is difficult if it is inside a function. This is for Buildings, #506.
  • September 24, 2015, by Marcus Fuchs:
    Replace Dymola specific annotation by loadSelector for MSL compliancy as reported by @tbeu at RWTH-EBC/AixLib#107
  • May 2, 2013, by Michael Wetter:
    Added function call to getAbsolutePath.
  • February 25, 2012, by Michael Wetter:
    Removed default value for parameter name.
  • March 5, 2011, by Michael Wetter:
    First implementation.