diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 858894a133..be4aeb63d6 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 81513a63-699a-474a-bbe3-1ecc64e6577d - 2023-10-03T19:37:23Z + eadc1a1d-2fe5-4a63-82ef-e6b3b5365c8b + 2023-10-04T22:06:18Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -292,7 +292,7 @@ location.rb rb resource - BF564292 + 84B055B2 materials.rb @@ -480,6 +480,12 @@ resource CFCD83CD + + in.schedules.csv + csv + test + 6244F711 + test_airflow.rb rb diff --git a/HPXMLtoOpenStudio/resources/location.rb b/HPXMLtoOpenStudio/resources/location.rb index 641f34ab34..529a696697 100644 --- a/HPXMLtoOpenStudio/resources/location.rb +++ b/HPXMLtoOpenStudio/resources/location.rb @@ -90,13 +90,21 @@ def self.get_epw_path(hpxml, hpxml_path) abs_epw_path = File.absolute_path(File.join(File.dirname(hpxml_path), epw_filepath)) end if not File.exist? abs_epw_path - # Check for weather path relative to this file + # Check for weather path relative to the HPXML file for level_deep in 1..3 level = (['..'] * level_deep).join('/') abs_epw_path = File.absolute_path(File.join(File.dirname(hpxml_path), level, 'weather', epw_filepath)) break if File.exist? abs_epw_path end end + if not File.exist? abs_epw_path + # Check for weather path relative to this file + for level_deep in 1..3 + level = (['..'] * level_deep).join('/') + abs_epw_path = File.absolute_path(File.join(File.dirname(__FILE__), level, 'weather', epw_filepath)) + break if File.exist? abs_epw_path + end + end if not File.exist? abs_epw_path fail "'#{epw_filepath}' could not be found." end