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

Revision history [back]

There are a few approaches, the most basic is to filter by name before removing it, but you could also filter by object type, which would be more flexible if there isn't a common element to the names of the objects you want to remove, or if the object names are unknown.

zone.equipment.each do |zone_equipment|
  next if not zone_equipment.name.to_s.include?(test_string)
  zone_equipment.remove
end

The test_string variable could be hard coded in the measure or could be a user argument.