2

Script to assign airwalls to selected space

Hey, I am trying to assign the "Surface" type Walls of a selected space to airwalls, through a script. I am able to get the surfaces of the selected space, check if they are Walls, and if their OutsideBoundaryCondition is "Surface", change the surface ConstructionName to "Air Wall". However, as I understand, for this script to work, adjacent surfaces to the surfaces assigned as airwalls (which would be part of the neighbouring space), need to be assigned to the same construction as well.

In SketchUp, the 'Outside Boundary Condition Object' SketchUp Imageprovides this information, but I do not know how to access this information through code. The surface class reference in the documentation (http://mea-developer-nrel-legacy-down...) does not specify anything about the Outside Boundary Condition Object (different from the Outside Boundary Condition ) Is there a method to tell me what the adjacent surface is to a specific surface, or a method to access the information above via code? Any other suggestions to implement this idea better are also welcome! Thanks.

gokul's avatar
684
gokul
asked 2016-11-28 11:47:55 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 07:43:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

2

@gokulram to get the outsideBoundaryConditionObject, use surface.adjacentSurface. That returns a bool. After checking if it exists (which it should if boundary condition is "Surface") add a .get to get the surface.

But, OpenStudio has a tie breaker for constructions on matched surfaces that should fix the matched surface for you. Notice in the OS app that when I hard assign the air wall directly to a surface in the core zone, that the surface in the affected perimeter zone inherits that construction (shows as green). If the construction was non symmetrical then OpenStudio would use a mirrored version of it.

image description

You can use inheritance diagram to see different places constructions can be applied. The deeper application is used when there is a conflict, with a hard assigned construction to a surface being the deepest, and a building level construction set being the shallowest.

Some example use cases for this are space types with construction sets for some surface types; such as an attic floor with insulation, or plenum floor, and also custom wall types like an medical imaging space type.

David Goldwasser's avatar
20.4k
David Goldwasser
answered 2016-11-28 12:25:53 -0500, updated 2016-11-28 14:07:23 -0500
edit flag offensive 0 remove flag delete link

Comments

Found a minor bug. If you use a non-symmetrical construction the GUI looks like it uses the same construction, but on forward translation to IDF it does indeed create a mirrored construction. "My Construction" has new sibling object named "My Construction Reversed".

David Goldwasser's avatar David Goldwasser (2016-11-28 12:33:52 -0500) edit

@DavidGoldwasser thanks, this is very helpful!

gokul's avatar gokul (2016-11-28 12:55:40 -0500) edit
add a comment see more comments
2

The method Surface::adjacentSurface(see here) should be what you're looking for.

ericringold's avatar
10.6k
ericringold
answered 2016-11-28 12:20:17 -0500, updated 2016-11-28 12:20:55 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks @EricRingold!

gokul's avatar gokul (2016-11-28 12:56:05 -0500) edit
add a comment see more comments