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

OpenStudio and EnergyPlus version numbers from OpenStudio SDK

asked 2017-04-24 17:39:51 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
7

answered 2017-04-24 18:26:57 -0500

updated 2018-07-20 14:48:42 -0500

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
edit flag offensive delete link more

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 gravatar image Julien Marrec  ( 2018-07-24 03:52:12 -0500 )edit

Your Answer

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

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2017-04-24 17:39:51 -0500

Seen: 152 times

Last updated: Jul 20 '18