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

In the OS App, priority is based on the order the equipment is added to the zone or the order from top to bottom. So, to change priority, users unfortunately have to delete objects and reorder them.

Here's some Ruby code I've used to do that using the SDK.

```
model.getZoneHVACEquipmentLists.each do |obj|

clg_eqpt = obj.equipmentInCoolingOrder htg_eqpt = obj.equipmentInHeatingOrder

obj.setCoolingPriority(clg_eqpt[0], 2) obj.setCoolingPriority(clg_eqpt[1], 1)

obj.setHeatingPriority(htg_eqpt[0], 2) obj.setHeatingPriority(htg_eqpt[1], 1)

end ```

click to hide/show revision 2
No.2 Revision

In the OS App, priority is based on the order the equipment is added to the zone or the order from top to bottom. So, to change priority, users unfortunately have to delete objects and reorder them.

Here's some Ruby code I've used to do that using the SDK.

```

model.getZoneHVACEquipmentLists.each do |obj|

|obj|

clg_eqpt = obj.equipmentInCoolingOrder htg_eqpt = obj.equipmentInHeatingOrder

obj.equipmentInHeatingOrder

obj.setCoolingPriority(clg_eqpt[0], 2) obj.setCoolingPriority(clg_eqpt[1], 1)

1)

obj.setHeatingPriority(htg_eqpt[0], 2) obj.setHeatingPriority(htg_eqpt[1], 1)

end ```

click to hide/show revision 3
No.3 Revision

In the OS App, priority is based on the order the equipment is added to the zone or the order from top to bottom. So, to change priority, users unfortunately have to delete objects and reorder them.

Here's some Ruby code I've used to do that using the SDK.SDK. This will swap the first and second zone equipment order.

model.getZoneHVACEquipmentLists.each do |obj|

  clg_eqpt = obj.equipmentInCoolingOrder
  htg_eqpt = obj.equipmentInHeatingOrder

  obj.setCoolingPriority(clg_eqpt[0], 2)
  obj.setCoolingPriority(clg_eqpt[1], 1)

  obj.setHeatingPriority(htg_eqpt[0], 2)
  obj.setHeatingPriority(htg_eqpt[1], 1)  

end