Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
3

OpenStudio and EnergyPlus version numbers from OpenStudio SDK

asked 7 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
7

answered 7 years ago

updated 6 years ago

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
Preview: (hide)
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  ( 6 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 266 times

Last updated: Jul 20 '18