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

Revision history [back]

Access the openstudio application measure path

Hi,

I am developing an openstudio measure. I want to get the measure local path "C:/Users/username/OpenStudio/Measures/measurename/measure.rb" by using commands in the measure method "run(model, runner, user_arguments)". However, when the measure is running by the openstudio application, the path I get (using Dir.pwd) is a template path (e.g. C:/Users/username/AppData/Local/Temp/osmodel-1694197536-7/resources/measures/xxx). Is there any way to get the measure local path "C:/Users/username/OpenStudio/Measures/measurename/measure.rb" in the run() method?

Thank you!

Best,

Access the openstudio application measure path

Hi,

I am developing an openstudio measure. I want to get the measure local path "C:/Users/username/OpenStudio/Measures/measurename/measure.rb" by using commands in the measure method "run(model, runner, user_arguments)". However, when the measure is running by the openstudio application, the path I get (using Dir.pwd) is a template path (e.g. C:/Users/username/AppData/Local/Temp/osmodel-1694197536-7/resources/measures/xxx). Is there any way to get the measure local path "C:/Users/username/OpenStudio/Measures/measurename/measure.rb" in the run() method?

Thank you!

Best,