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

Revision history [back]

Calling name.get on any ModelObject (or WorkspaceObject) will return a the object name as a string. With that, you can use the Ruby method include? to check if the name string contains another string, in your case 'Plenum'. So you can write:

if space.name.get.include? "Plenum"
  #do stuff
end

As for external sources, Ruby has a built-in class for parsing .csv files. For word documents you'll have to get a specific gem.