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

Revision history [back]

click to hide/show revision 1
initial version

AddDaylightSensors.rb error

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!

https://github.com/NREL/OpenStudio-analysis-spreadsheet/blob/master/measures/AddDaylightSensors/measure.rb

#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

AddDaylightSensors.rb error

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!

https://github.com/NREL/OpenStudio-analysis-spreadsheet/blob/master/measures/AddDaylightSensors/measure.rb

 #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 

end

AddDaylightSensors.rb error

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!

https://github.com/NREL/OpenStudio-analysis-spreadsheet/blob/master/measures/AddDaylightSensors/measure.rb

 #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

AddDaylightSensors.rb error

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!

https://github.com/NREL/OpenStudio-analysis-spreadsheet/blob/master/measures/AddDaylightSensors/measure.rb

 #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