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

Revision history [back]

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Make a choice argument with all the refrigeration cases in the model

ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

add building to string vector with space type

building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Make

Here I make a choice argument with all the refrigeration cases in the model

model ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

Here I add building to string vector with space type

type building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Here I make a choice argument with all the refrigeration cases in the model ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

Here I add building to string vector with space type building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Here I make a choice argument with all the refrigeration cases in the model ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

Here I add building to string vector with space type building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Here I make a choice argument with all the refrigeration cases in the model ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

Here I add building to string vector with space type building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?

How to make a choice argument for ALL objects of a certain type (measure)?

Here is what I have so far:

Here I make a choice argument with all the refrigeration cases in the model ref_case = OpenStudio::Ruleset::makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true) ref_case.setDisplayName("Apply the measure to") args << ref_case

I would like to also have the option of "All refrigeration cases". I have seen many examples that use the following method:

Here I add building to string vector with space type building = model.getBuilding space_type_handles << building.handle.to_s space_type_display_names << "Entire Building"

However, I would like to maintain the 'makeChoiceArgumentOfWorkspaceObjects("ref_case","OS_Refrigeration_Case".to_IddObjectType,model,true)'

In staying with this approach, how would I add an option for "All Refrigeration Cases"?