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 stringstartwhere
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
| Type | Name | Default | Description |
|---|---|---|---|
| String | filNam | Name of weather data file | |
| String | start | Start of the string that contains the elements | |
| String | name | Name of data element, used in error reporting |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | element | Element at position 'pos' of the line that starts with 'start' |
Revisions
-
December 11, 2021, by Michael Wetter:
Addedimpuredeclaration 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 byloadSelectorfor MSL compliancy as reported by @tbeu at RWTH-EBC/AixLib#107 -
May 2, 2013, by Michael Wetter:
Added function call togetAbsolutePath. -
February 25, 2012, by Michael Wetter:
Removed default value for parametername. -
March 5, 2011, by Michael Wetter:
First implementation.