Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

# Revision history [back]

When trying to use this script in the OpenStudio application as an "add measure now," I get the error that my spaces "has no exterior natural lighting. No sensor will be added." However, the spaces have a thermal zone, and have outdoor boundary conditions, so I'm not sure what qualifies as having exterior natural lighting. Here is a snippet of the code from the github site, but I can't interpret it, thanks for the help!

#eliminate spaces that don't have exterior natural lighting has_ext_nat_light = false space.surfaces.each do |surface| next if not surface.outsideBoundaryCondition == "Outdoors" surface.subSurfaces.each do |sub_surface| next if sub_surface.subSurfaceType == "Door" next if sub_surface.subSurfaceType == "OverheadDoor" has_ext_nat_light = true end end if has_ext_nat_light == false runner.registerWarning("Space '#{space.name}' has no exterior natural lighting. No sensor will be added.") next end

 2 No.2 Revision David Goldwasser 19010 ●56 ●14 http://www.openstudio.net/

When trying to use this script in the OpenStudio application as an "add measure now," I get the error that my spaces "has no exterior natural lighting. No sensor will be added." However, the spaces have a thermal zone, and have outdoor boundary conditions, so I'm not sure what qualifies as having exterior natural lighting. Here is a snippet of the code from the github site, but I can't interpret it, thanks for the help!

 #eliminate spaces that don't have exterior natural lighting
has_ext_nat_light = false
space.surfaces.each do |surface|
next if not surface.outsideBoundaryCondition == "Outdoors"
surface.subSurfaces.each do |sub_surface|
next if sub_surface.subSurfaceType == "Door"
has_ext_nat_light = true
end
end
if has_ext_nat_light == false
runner.registerWarning("Space '#{space.name}' has no exterior natural lighting. No sensor will be added.")
next
end end

 3 retagged Neal Kruis 4510 ●6 ●15 http://bigladdersoftware.com/

When trying to use this script in the OpenStudio application as an "add measure now," I get the error that my spaces "has no exterior natural lighting. No sensor will be added." However, the spaces have a thermal zone, and have outdoor boundary conditions, so I'm not sure what qualifies as having exterior natural lighting. Here is a snippet of the code from the github site, but I can't interpret it, thanks for the help!

 #eliminate spaces that don't have exterior natural lighting
has_ext_nat_light = false
space.surfaces.each do |surface|
next if not surface.outsideBoundaryCondition == "Outdoors"
surface.subSurfaces.each do |sub_surface|
next if sub_surface.subSurfaceType == "Door"
has_ext_nat_light = true
end
end
if has_ext_nat_light == false
runner.registerWarning("Space '#{space.name}' has no exterior natural lighting. No sensor will be added.")
next
end

 4 retagged __AmirRoth__ 4388 ●5 ●16 http://bleedinggreenna...

When trying to use this script in the OpenStudio application as an "add measure now," I get the error that my spaces "has no exterior natural lighting. No sensor will be added." However, the spaces have a thermal zone, and have outdoor boundary conditions, so I'm not sure what qualifies as having exterior natural lighting. Here is a snippet of the code from the github site, but I can't interpret it, thanks for the help!

 #eliminate spaces that don't have exterior natural lighting
has_ext_nat_light = false
space.surfaces.each do |surface|
next if not surface.outsideBoundaryCondition == "Outdoors"
surface.subSurfaces.each do |sub_surface|
next if sub_surface.subSurfaceType == "Door"