First time here? Check out the Help page!
![]() | 1 | initial version |
This has come up a number of times. The current Set Window to Wall Ratio by Facade Measure does only let you select the scope of the measure by orientation. We don't currently have a way in OpenStudio to pass a selection to the measure like user scripts in the SketchUp plugin can. One solution would be for us or someone else to add a new argument to the measure to select a measure to include or exclude from the measure. You could also filter by story, surface size, construction etc. If you want to use this today, below is a quick fix.
Next open up the measure.rb file and look for the following code.
new_window = s.setWindowToWallRatio(wwr, sillHeight_si.value, true)
This is inside of a loop through surfaces where "s" is the surface. If you add the lines below prior to the "new_window" line you can hard code it to skip surfaces in one or my space type based on the space type name.
if space.get.spaceType.is_initialized and space.get.spaceType.get.name.to_s == "Atrium"
runner.registerInfo("Skipping this surface because it belongs to a hard coded space type that I want to skip")
next
end
You may want to skip the "info" message if you have a lot of these. I just put it in the example code for demonstration. The "new_window" line should be on the line after "end". Congratulations! you are a ruby programmer now.
FYI - the only reason I can call "space" is that that was defined earlier in the loop through surfaces. In english I'm basically saying "If the parent space for this surface has a space type assigned, and if the name of that space type is "Atrium" then go to the next surface in the model, don't do anything to this one".
![]() | 2 | No.2 Revision |
This has come up a number of times. The current Set Window to Wall Ratio by Facade Measure does only let you select the scope of the measure by orientation. We don't currently have a way in OpenStudio to pass a selection to the measure like user scripts in the SketchUp plugin can. One solution would be for us or someone else to add a new argument to the measure to select a measure to include or exclude from the measure. You could also filter by story, surface size, construction etc. If you want to use this today, below is a quick fix.
new_window = s.setWindowToWallRatio(wwr, sillHeight_si.value, This is inside of a loop through surfaces where "s" is the surface. If you add the lines below prior to the "new_window" line you can hard code it to skip surfaces in one or my space type based on the space type name.
if space.get.spaceType.is_initialized and space.get.spaceType.get.name.to_s == "Atrium"
runner.registerInfo("Skipping this surface because it belongs to a hard coded space type that I want to skip")
next
end
You may want to skip the "info" message if you have a lot of these. I just put it in the example code for demonstration. The "new_window" line should be on the line after "end". Congratulations! you are a ruby programmer now.
FYI - the only reason I can call "space" is that that was defined earlier in the loop through surfaces. In english I'm basically saying "If the parent space for this surface has a space type assigned, and if the name of that space type is "Atrium" then go to the next surface in the model, don't do anything to this one".
![]() | 3 | No.3 Revision |
This has come up a number of times. The current Set Window to Wall Ratio by Facade Measure does only let you select the scope of the measure by orientation. We don't currently have a way in OpenStudio to pass a selection to the measure like user scripts in the SketchUp plugin can. One solution would be for us or someone else to add a new argument to the measure to select a measure to include or exclude from the measure. You could also filter by story, surface size, construction etc. If you want to use this today, below is a quick fix.
First, download the measure from BCL, and make a copy of it, so it is in the "My Measures" directory.
Next open up the measure.rb file and look for the following code.
new_window = s.setWindowToWallRatio(wwr, sillHeight_si.value, true)
This is inside of a loop through surfaces where "s" is the surface. If you add the lines below prior to the "new_window" line you can hard code it to skip surfaces in one or my follow this logic. "If the parent space for this surface has a space type based on the assigned, and if the name of that space type name.is Atrium then go to the next surface in the model, don't do anything to this one".
if space.get.spaceType.is_initialized and space.get.spaceType.get.name.to_s == "Atrium"
runner.registerInfo("Skipping this surface because it belongs to a hard coded space type that I want to skip")
next
end
You may want to skip the "info" message if you have a lot of these. I just put it in the example code for demonstration. The "new_window" line should be on the line after "end". Congratulations! you are a ruby programmer now.
now. FYI - the only reason I can call "space" is that that was defined earlier in the loop through surfaces. In english I'm basically saying "If the parent space for this surface has a space type assigned, and if the name of that space type is "Atrium" then go to the next surface in the model, don't do anything to this one".surfaces.
![]() | 4 | No.4 Revision |
This has come up a number of times. The current Set Window to Wall Ratio by Facade Measure does only let you select the scope of the measure by orientation. We don't currently have a way in OpenStudio to pass a selection to the measure like user scripts in the SketchUp plugin can. One solution would be for us or someone else to add a new argument to the measure to select a measure to include or exclude from the measure. You could also filter by story, surface size, construction etc. If you want to use this today, below is a quick fix.
First, download the measure from BCL, and make a copy of it, so it is in the "My Measures" directory.
Next open up the measure.rb file and look for the following code.
new_window = s.setWindowToWallRatio(wwr, sillHeight_si.value, true)
This is inside of a loop through surfaces where "s" is the surface. If you add the lines below prior to the "new_window" line you can hard code it to follow this logic. "If the parent space for this surface has a space type assigned, and if the name of that space type is Atrium then go to the next surface in the model, don't do anything to this one".
if space.get.spaceType.is_initialized and space.get.spaceType.get.name.to_s == "Atrium"
runner.registerInfo("Skipping this surface because it belongs to a hard coded space type that I want to skip")
next
end
You may want to skip the "info" message if you have a lot of these. I just put it in the example code for demonstration. The "new_window" line should be on the line after "end". Congratulations! you are a ruby programmer now. FYI - the only reason I can call "space" is that that was defined earlier in the loop through surfaces.now.