Revision history  [back]

It just doesn't know what your model is.

Check out the Mesure Writing Guide, there's a "reporting measure" section that should prove most interesting.

If your case, you currently cannot access it in the arguments method.

If you wanted to do something in the run method, you could do this:

model = runner.lastOpenStudioModel
if model.empty?
  runner.registerError("Cannot find last model.")
  return false
end
model = model.get

# then "model" is actually initialized and you can get your schedules
model.getSchedules...

You can see the function signatures for these in ReportingMeasure.hpp.

Note: this used to be called ReportingUserScript before OS 2.0.0.

It just doesn't know what your model is.

Check out the Mesure Writing Guide, there's a "reporting measure" section that should prove most interesting.

If your case, what you currently cannot access it in the arguments method.

If you wanted to do something in the run method, you could do this:need:

model = runner.lastOpenStudioModel
if model.empty?
  runner.registerError("Cannot find last model.")
  return false
end
model = model.get

# then "model" is actually initialized and you can get your schedules
model.getSchedules...

You can see the function signatures for these in ReportingMeasure.hpp.

Note: this used to be called ReportingUserScript before OS 2.0.0.