BuildingSystems.BoundaryConditions.WeatherData.BaseClasses.getLastHeaderElementTMY3

# .BuildingSystems.BoundaryConditions.WeatherData.BaseClasses.getLastHeaderElementTMY3

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

## 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.

#### Interface

>     impure function getLastHeaderElementTMY3
>       extends Modelica.Icons.Function;
>       input String filNam "Name of weather data file" annotation(
>         Dialog(loadSelector(filter = "Weather files (*.mos)", caption = "Select weather file")));
>       input String start "Start of the string that contains the elements";
>       input String name "Name of data element, used in error reporting";
>       output String element "Element at position 'pos' of the line that starts with 'start'";
>     end getLastHeaderElementTMY3;

## Revisions

- December 11, 2021, by Michael Wetter:
  Added `impure` declaration for MSL 4.0.0.
- April 21, 2016, by Michael Wetter:
  Removed call to BuildingSystems.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.

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos