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

Remove specified zone equipment using measure

asked 2018-05-26 05:32:50 -0600

katsuya.obara's avatar

updated 2018-05-26 12:29:34 -0600

I have model with FCU and PAU.
I am trying to remove FCU from zones writing measure by myself referring to this post.
However, in this method, PAU terminal is also removed.
Does anyone know how I can specify the terminal which should be removed from thermal zone?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-26 22:15:57 -0600

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2018-05-26 05:32:50 -0600

Seen: 144 times

Last updated: May 26 '18