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

OS measure subfolder

asked 4 years ago

Phil's avatar

updated 3 years ago

Hi there, I am facing a problem with a measure using a resource folder with a subfolder "data" containing several csv files. If I run the model using the measure, it does not copy the subfolder "data" with the csv files into the temp folder. Do you have an idea what the problem could be here? Obviously the measure fails because it does not find the needed csv files.

Thanks for your help.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

updated 4 years ago

Try putting your CSV into the resources/ subfolder.

That is given the following structure:

measure_folder/measure.xml
measure_folder/measure.rb

Put your files either as :

measure_folder/resources/file1.csv
measure_folder/resources/data/file1.csv

Edit: I knew from memory that the resources/ subfolder would be copied along with the tests/one, but I was having trouble finding where this would be defined. I think it's here: https://github.com/NREL/OpenStudio/bl...

Preview: (hide)
link

Comments

Hi Julien

Option 1 with "measure_folder/resources/file1.csv" works but it is a bit messy with several csv files and other helper measures.

Option 2 does not work. OS just copies the resources folder with my helper measures and ignores all other subfolders.

Phil's avatar Phil  ( 4 years ago )

Go with option 1 then.

Julien Marrec's avatar Julien Marrec  ( 4 years ago )

but its messy :-(

Phil's avatar Phil  ( 4 years ago )
1
  1. If that's really bothering you, in that case open an enhancement request on github. This time I went ahead and created it for you as an example: NREL/OpenStudio#4156

  2. You do not have to develop your measure inside your ~/OpenStudio/Measures folder. There are a ton of ways to develop them somewhere else and have them ship to your ~/OpenStudio/Measures/ folder for testing as needed or to export it to the BCL (a rake task that would glob and copy stuff for eg, symlinking, etc).

Julien Marrec's avatar Julien Marrec  ( 4 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: 4 years ago

Seen: 113 times

Last updated: Dec 04 '20