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

Revision history [back]

click to hide/show revision 1
initial version

Additional methods for removing EMS objects:

model.getEnergyManagementSystemActuators(&:remove)
model.getEnergyManagementSystemConstructionIndexVariables(&:remove)
model.getEnergyManagementSystemCurveOrTableIndexVariables(&:remove)
model.getEnergyManagementSystemGlobalVariables(&:remove)
model.getEnergyManagementSystemInternalVariables(&:remove)
model.getEnergyManagementSystemMeteredOutputVariables(&:remove)
model.getEnergyManagementSystemOutputVariables(&:remove)
model.getEnergyManagementSystemPrograms(&:remove)
model.getEnergyManagementSystemProgramCallingManagers(&:remove)
model.getEnergyManagementSystemSensors(&:remove)
model.getEnergyManagementSystemSubroutines(&:remove)
model.getEnergyManagementSystemTrendVariables(&:remove)

Credit to @Scott Horowitz from NREL.

You could also extend the solution provided by @Eric Martin to multiple EMS objects.

# remove EMS objects model.getEnergyManagementSystemSensors.each do |ems_obj| ems_obj.remove end model.getEnergyManagementSystemActuators.each do |ems_obj| ems_obj.remove end model.getEnergyManagementSystemGlobalVariables.each do |ems_obj| ems_obj.remove end

etc... for other EMS objects