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

measure arguments not showing from OS 2.9.1 Measures tab

asked 2021-02-04 11:22:30 -0600

mattkoch's avatar

updated 2021-02-04 12:44:09 -0600

I wrote a custom OpenStudio measure, i.e. it is not from BCL. It works just fine in the OpenStudio 2.9.1 Application when I call it from the Components & Measures -> Apply Measure Now menu. However, when I go to the Measures tab of the OpenStudio 2.9.1 Application (third to last on the left edge, near the bottom, just above the Run tab and the Results tab) and then select that measure from the Library and then drag it to the OpenStudio Measures slots (above the EnergyPlus Measures slots and the Reporting Measures slots), it lands there ok, but when I click on it, the arguments do not show up? Why don't they show, and how can I make them show? Thanks.

edit retag flag offensive close merge delete


That is strange. It could be interesting to get the 1.1.0 version of the application and see if it is still an issue. There was an issue with bool arguments that has been fixed, but it impacted both apply measures now and the measures tab. There was an issue with reporting measure arguments, but it sounds like you are using a model measure. If you look on the last line of the measure.xml file do you see an error. Look on the copy of the measure in measure directory in this OSM's project folder, not where you store your custom measures. The xml could have changed due to current model loaded.

David Goldwasser's avatar David Goldwasser  ( 2021-02-04 13:06:42 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-02-04 15:19:06 -0600

mattkoch's avatar

It appears that the measure gets copied into the measures sub-folder of the folder that is associated with the .osm file. This only copies the resources sub-folder of the measure and within it only files - not sub-sub-folders. I tend to spread my measures out into several .rb files, so that common functionality is maintained in common files, and I tend to keep these .rb files in a functions sub-folder of the measure, not the resources sub-folder.

This is fine when using Apply Measure Now, but when using the Measure tab, said copying takes place and any files not in the resources sub-folder as well as any sub-sub-folders in the resources sub-folder then get lost, hence breaking the measure.

So, I moved all my functions from the functions sub-folder to the resources sub-folder, and now it works. I understand this from a "simplicity of coding the OSM Application perspective", but it complicates measure maintainability, and if there are lots of data files (e.g. tariffs) in addition to function files, then the resources sub-folder becomes messy pretty quickly.

Oh well, at least it is solved.

edit flag offensive delete link more


@mattkoch, glad you figured it out. I didn't think of that but it makes sense. This would also be an issue using PAT and sending measures to OpenStudio Server. There was talk about more flexibility to files in measures, let me follow up on status of that. I know we are working on better support for custom ruby gems that ship with OpenStudio like OpenStudio Standards and OpenStudio Extension gem.

David Goldwasser's avatar David Goldwasser  ( 2021-02-04 16:04:25 -0600 )edit

It's on the wishlist here:

shorowit's avatar shorowit  ( 2021-02-04 19:46:08 -0600 )edit

Nice. Another possible workaround might be if at least the model path could be made available to the measure. The actual model path, not some temporary directory.

mattkoch's avatar mattkoch  ( 2021-02-04 21:30:59 -0600 )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


Asked: 2021-02-04 11:22:30 -0600

Seen: 137 times

Last updated: Feb 04 '21