3

OpenStudio and EnergyPlus version numbers from OpenStudio SDK

There is an OSVersion namespace and a Version object in the Model namespace, but I cannot figure out how to extract the OpenStudio version string (e.g., 2.1.0) out of these. And what about EnergyPlus?

__AmirRoth__'s avatar
4.4k
__AmirRoth__
asked 2017-04-24 17:39:51 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

7

There are a couple of utility functions for this, here's the Ruby:

require 'openstudio'

puts OpenStudio::openStudioVersion()
puts OpenStudio::energyPlusVersionMajor()
puts OpenStudio::energyPlusVersionMinor()
puts OpenStudio::energyPlusVersionPatch()
puts OpenStudio::energyPlusVersion()
puts OpenStudio::energyPlusBuildSHA()

Right now, that writes out (from my built version of OpenStudio)

2.1.0
8
7
0
8.7.0
78a111df4a
Jason DeGraw's avatar
2.2k
Jason DeGraw
answered 2017-04-24 18:26:57 -0500, updated 2018-07-20 14:48:42 -0500
edit flag offensive 0 remove flag delete link

Comments

(There's also OpenStudio::openStudioLongVersion which will append the build SHA to the version, eg 2.6.1.c8b48af2d6, but unless you do custom builds openStudioVersion will do the job)

Julien Marrec's avatar Julien Marrec (2018-07-24 03:52:12 -0500) edit
add a comment see more comments