How can I import a weatherFile by c# into OpenStudio model? [closed]
I use the c# API to generate a OpenStudio Model. I can add constructions, thermalZones, SchedulSets. Now I try to set the weather File. But I only found a method to get the Weatherfile.
OpenStudio.Model model = new Model;
model.getWeatherFile();
Is there an opportunity to set the Weather File?
Thanks for your help!!
I haven't worked with the C# bindings yet, but generally there are field getters and setters for the model object and I imagine for C# it would look something like model.setWeatherFile(WeatherFile weatherFile) where you pass an instance of a WeatherFile.
yes, this is the way it should be work. I use the set-methodes to add construction, material etc. but the model.setWeatherFile -method doesn´t exist. There is the get Method but not the set. The same problem ist to create a schedule. There is no set Methode.
Looking through the documentation it looks like a WeatherFile is a unique object without a public constructor (a singleton?) and thus when you call model.getWeatherFile() you are both instantiating a weather file and returning a reference to it.