Hi All
I just updated the "Export Meter to csv" for the OpenStudio Application 1.1.0, because I found the original one from BCL doesn't work anymore with new OpenStudio Application. Thus I learned from other OpenStudio measure and modified the original one. Thanks mdahlhausen for the original measure. It is great measure.
The modified measure.rb works well. As I do not have enough points to upload the .rb file, just put the related parts below.
1: the reporting class name
class ExportMetertoCSV < OpenStudio::Measure::ReportingMeasure
2: the arguments function
def arguments(model=nil)
args = OpenStudio::Measure::OSArgumentVector.new
#make an argument for the variable name
meter_name = OpenStudio::Measure::OSArgument.makeStringArgument("meter_name",true)
meter_name.setDisplayName("Enter Meter Name.")
args << meter_name
#make an argument for the reporting frequency
reporting_frequency_chs = OpenStudio::StringVector.new
reporting_frequency_chs << "Hourly"
reporting_frequency_chs << "Zone Timestep"
reporting_frequency = OpenStudio::Measure::OSArgument.makeChoiceArgument('reporting_frequency', reporting_frequency_chs, true)
reporting_frequency.setDisplayName("Reporting Frequency.")
reporting_frequency.setDefaultValue("Hourly")
args << reporting_frequency
3: in run function
def run(runner, user_arguments)
super(runner, user_arguments)
# use the built-in error checking
if !runner.validateUserArguments(arguments, user_arguments)
return false
end