First time here? Check out the Help page!
1 | initial version |
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 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...
2 | No.2 Revision |
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 need: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.