First time here? Check out the Help page!
1 | initial version |
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.