Revision history [back]
Here are two ways to generate the IDF using the OpenStudio CLI without running a simulation:
1. Use an OpenStudio Workflow (OSW)
Create a file called test.osw with the following contents:
{
"seed_file": "test.osm"
}
Then run openstudio run -m -w test.osw
, where the -m
flag prevents the simulation from running. You will find the IDF at run/in.idf.
2. Use the OpenStudio SDK
Create a simple ruby script called generate_idf.rb
with the following contents:
vt = OpenStudio::OSVersion::VersionTranslator.new
model = vt.loadModel(OpenStudio::Path.new("test.osm")).get
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
model_idf = ft.translateModel(model)
File.open("test.idf", "w") { |f| f << model_idf.to_s }
Then run openstudio generate_idf.rb
. It will create a test.idf file next to your test.osm file.
Here are two ways to generate the IDF using the OpenStudio CLI without running a simulation:
1. Use an OpenStudio Workflow (OSW)
Create a file called next to it and call it test.osw with the following contents:
{
"seed_file": "test.osm"
}
Then run openstudio run -m -w test.osw
, where the -m
flag prevents the simulation from running. You will find the IDF at run/in.idf.
2. Use the OpenStudio SDK
Create a simple ruby script called generate_idf.rb
with the following contents:
vt = OpenStudio::OSVersion::VersionTranslator.new
model = vt.loadModel(OpenStudio::Path.new("test.osm")).get
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
model_idf = ft.translateModel(model)
File.open("test.idf", "w") { |f| f << model_idf.to_s }
Then run openstudio generate_idf.rb
. It will create a test.idf file next to your test.osm file.
Here are two ways to generate the IDF using the OpenStudio CLI without running a simulation:
1. Use an OpenStudio Workflow (OSW)
Create a file next to it and call it test.osw with the following contents:
{
"seed_file": "test.osm"
}
Then run openstudio run -m -w test.osw
, where the -m
flag prevents the simulation from running. You will find the IDF at run/in.idf.
2. Use the OpenStudio SDK
Create a simple ruby script called generate_idf.rb
with the following contents:
vt = OpenStudio::OSVersion::VersionTranslator.new
model = vt.loadModel(OpenStudio::Path.new("test.osm")).get
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
model_idf = ft.translateModel(model)
File.open("test.idf", "w") { |f| f << model_idf.to_s }
Then run openstudio generate_idf.rb
. It will create a test.idf file next to your test.osm file.