Skip to content

Commit

Permalink
Fixing a reference to EnergyPlus 7.2
Browse files Browse the repository at this point in the history
This causes OpenStudio's run tab to always say that EnergyPlus 8.0 has not been found, even if it has.
  • Loading branch information
axelstudios committed Jul 29, 2013
1 parent efb742a commit b4d832f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions openstudiocore/src/openstudio_lib/RunTabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,16 @@ void RunView::getRadiancePreRunWarningsAndErrors(std::vector<std::string> & warn
void RunView::locateEnergyPlus()
{
openstudio::runmanager::ConfigOptions co(true);
bool energyplus_7_2_not_installed = co.getTools().getAllByName("energyplus").getAllByVersion(openstudio::runmanager::ToolVersion(7,2)).tools().size() == 0;
if (energyplus_7_2_not_installed){
boost::optional<int> major = getRequiredEnergyPlusVersion().getMajor();
boost::optional<int> minor = getRequiredEnergyPlusVersion().getMinor();
bool energyplus_not_installed;
if (major && minor){
energyplus_not_installed = co.getTools().getAllByName("energyplus").getAllByVersion(openstudio::runmanager::ToolVersion(*major,*minor)).tools().size() == 0;
} else {
energyplus_not_installed = co.getTools().getAllByName("energyplus").getAllByVersion(openstudio::runmanager::ToolVersion(8,0)).tools().size() == 0;
}

if (energyplus_not_installed){
m_toolWarningLabel->show();
} else {
m_toolWarningLabel->hide();
Expand Down

1 comment on commit b4d832f

@axelstudios
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kbenne Found another EnergyPlus migration step. I added this to the wiki.

Please sign in to comment.