Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/openstudio/workflow/util/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def apply_measure(registry, step, options = {}, energyplus_output_requests = fal
# We handle the case where n_args == 0 for backward compatibility
n_args = measure_object.method(:arguments).arity
if (n_args == 0)
logger.warn "Reporting Measure at #{measure_path} is using the old format where the 'arguments' method does not take model. Please consider updating this to `def arguments(model)`."
logger.warn "Reporting Measure at '#{measure_path}' is using the old format where the 'arguments' method does not take model. Please consider updating this to `def arguments(model)`."
arguments = measure_object.arguments
else
arguments = measure_object.arguments(@model.clone(true).to_Model)
Expand Down Expand Up @@ -474,6 +474,17 @@ def apply_measure(registry, step, options = {}, energyplus_output_requests = fal

begin
if energyplus_output_requests

# Just in case this workflow-gem is used (via bundle) in an
# older OS SDK version, where the base class doesn't have it,
# we check for existence to begin with
if measure_object.respond_to?(:modelOutputRequests)
# If there is an overidden method in the measure itself: Warn
if measure_object.method(:modelOutputRequests).owner == measure_object.class
logger.error "Reporting Measure at '#{measure_path}' has a 'modelOutputRequests' method, but that is only available in the C++ CLI, it will NOT be run."
end
end
Comment on lines +477 to +486
Copy link
Contributor Author

@jmarrec jmarrec Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before running the energyPlusOutputRequests, check if there is an overriden modelOutputRequests and just log an error saying it's not going to be run.


logger.debug "Calling measure.energyPlusOutputRequests for '#{measure_dir_name}'"
idf_objects = measure_object.energyPlusOutputRequests(runner, argument_map)
num_added = 0
Expand Down
Loading