
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Insert the following code in MainClass.vb, Function Initialize(...), before "Return True" | |
' Convert to C input files (Y. Shi) | |
Dim utf8WithoutBom As New System.Text.UTF8Encoding(False) | |
' Convert simulation control | |
Using sim_file As New System.IO.StreamWriter(myWorkbook.Path + "/" + Microsoft.VisualBasic.Left(myWorkbook.Name, InStrRev(myWorkbook.Name, ".")) + "ctrl", False, utf8WithoutBom) | |
sim_file.WriteLine("{0,-24}{1,-4}", "SIMULATION_START_YEAR", startYear) | |
sim_file.WriteLine("{0,-24}{1,-4}", "SIMULATION_END_YEAR", endYear) | |
sim_file.WriteLine("{0,-24}{1,-4}", "ROTATION_SIZE", rotationSize) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In WeatherClass.c, Function ReadExcelWeatherFile(...), paste the following lines before "weatherBook.Close()" | |
' Convert to C input files (Y. Shi) | |
Dim utf8WithoutBom As New System.Text.UTF8Encoding(False) | |
Using file As New System.IO.StreamWriter(weatherBook.Path + "/" + Microsoft.VisualBasic.Left(weatherBook.Name, InStrRev(weatherBook.Name, ".")) + "weather", False, utf8WithoutBom) | |
file.WriteLine("{0,-20}{1,-8}", "LATITUDE", Me.locationLatitude) | |
file.WriteLine("{0,-20}{1,-8}", "ALTITUDE", Me.locationAltitude) | |
file.WriteLine("{0,-20}{1,-8}", "SCREENING_HEIGHT", Me.screeningHeight) |
NewerOlder