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

no arguments found when trying to compute arguments though OpenStudio CLI

asked 2020-07-17 17:06:42 -0600

updated 2020-07-17 19:36:02 -0600

When executing the --compute_arguments option using the OpenStudio CLI per these instructions I get back an empty array for the arguements of a measure. For example, the ChangeBuildingLocation measure from BCL returns arguemets as expeceted but the CreateBarFromBuildingTypeRatios measure from BCL returns an empty array for the arguements. Both measures both have arguments so I can't find what the problem is.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-18 19:00:56 -0600

I downloaded these measures from the BCL and think this is probably happening because the CreateBarFromBuildingTypeRatios measure has spaces in the directory name, i.e. "Create Bar From Building Type Ratios"

So when you make the call to compute_arguments you need to add quotes around the directory name otherwise the CLI will think you are computing arguments for a measure in a directory named "Create".

C:\test>\openstudio-3.0.1\bin\openstudio.exe measure --compute_arguments untitled.osm "Create Bar From Building Type Ratios"
edit flag offensive delete link more


I have it returning results for me but the arguments array in particular is empty. Can you confirm that you're getting back arguments if you do something like: JSON.parse(computed_measure_arguments) ["arguments"]? I successfully updated the README file for the measure using CLI and it also indicates that it isn't recognizing any argument information. The README says:

(Automatically generated argument information follows)


This measure does not have any user arguments

Lincoln's avatar Lincoln  ( 2020-07-19 10:54:27 -0600 )edit

Yes, here is the output I get. I also posted the measure.xml so you can compare file checksums with yours. You have to pass an osm to the compute_arguments method. I used an empty model at version 3.0.1, I used the same CLI version.

macumber's avatar macumber  ( 2020-07-19 11:05:51 -0600 )edit

I found the culprit. The measure requires modules from the openstudio-extension-gem. If I instead save those modules locally to the resources directory of the measure and change the measure.rb file to load the modules locally it works.

Lincoln's avatar Lincoln  ( 2020-07-19 12:18:15 -0600 )edit

might have something to do with my installation. I always have to include my local gem path to openstudio-standards which isn't normal so it might have something to do with that.

Lincoln's avatar Lincoln  ( 2020-07-19 14:02:00 -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


Asked: 2020-07-17 17:06:42 -0600

Seen: 203 times

Last updated: Jul 18 '20