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

Revision history [back]

The 'space' object is a child of the 'building'. Building is part of model, but not everything is in it. Exterior lights for example are part of 'facility'.

There 'thermal zones' and 'space types' are just assigned to spaces. Both of these can be assigned to multiple spaces.

If you have a thermal zone you get the spaces like this. It may not have a space, so that is why you have to check if it is empty. (For a completed model it should have a space. Once you have the array of spaces then you can loop through the spaces to get their space type with similar code. Keep in mind spaces under a thermal zone may have different space types from each other, or may not have a space type assigned.

if thermal_zone.spaces.is_initialized
  spaces = thermal_zone.spaces.get
end

But many objects like floorArea or numberOfPeople can be called directly from the thermal zone, so you don't always have to drill down.

The 'space' object is a child of the 'building'. Building is part of model, but not everything is in it. Exterior lights for example are part of 'facility'.

There 'thermal zones' and 'space types' are just assigned to spaces. spaces, it isn't really part of a inheritance with one above the other. Both of these can be assigned to multiple spaces.

If you have a thermal zone you get the spaces like this. It may not have a space, so that is why you have to check if it is empty. (For a completed model it should have a space. Once you have the array of spaces then you can loop through the spaces to get their space type with similar code. Keep in mind spaces under a thermal zone may have different space types from each other, or may not have a space type assigned.

if thermal_zone.spaces.is_initialized
  spaces = thermal_zone.spaces.get
end

But many objects like floorArea or numberOfPeople can be called directly from the thermal zone, so you don't always have to drill down.

The 'space' object is a child of the 'building'. Building is part of model, but not everything is in it. Exterior lights for example are part of 'facility'.

There 'thermal zones' and 'space types' are just assigned to spaces, it isn't really part of a inheritance with one above the other. Both of these can be assigned to multiple spaces.

If you have a thermal zone you get the spaces like this. It may not have a space, so that is why you have to check if it is empty. (For a completed model it should have a space. space) Once you have the array of spaces then you can loop through the spaces to get their space type with similar code. Keep in mind spaces under a thermal zone may have different space types from each other, or may not have a space type assigned.

if thermal_zone.spaces.is_initialized
  spaces = thermal_zone.spaces.get
end

But many objects like floorArea or numberOfPeople can be called directly from the thermal zone, so you don't always have to drill down.

The 'space' object is a child of the 'building'. Building is part of model, but not everything is in it. Exterior lights for example are part of 'facility'.

There 'thermal zones' and 'space types' are just assigned to spaces, it isn't really part of a inheritance with one above the other. Both of these can be assigned to multiple spaces.

If you have a thermal zone you get the spaces like this. It may not have a space, so that is why you have to check if it is empty. (For a completed model it should have a space) Once you have the array of spaces then you can loop through the spaces to get their space type with similar code. Keep in mind spaces under a thermal zone may have different space types Answer Updated: code removed, see comments from each other, or may not have a space type assigned.@macumber for code example

if thermal_zone.spaces.is_initialized
  spaces = thermal_zone.spaces.get
end

But many objects like floorArea or numberOfPeople can be called directly from the thermal zone, so you don't always have to drill down.