I wonder if someone might be able to tell me where I’m going wrong here?
If I make a simple Honeybee Window Construction and apply it to an Aperture, can I then ‘get’ that construction later on?
I seem to be able to pull the name out when I use the ‘HB Faces By Attribute’, but if I try and pass that name on to an ‘HB Deconstruct Construction’ or an ‘HB Search Constructions’ they don’t return anything for me?
I was just struggling to fetch construction data from apertures my self.
I found that I had to first explicitly fetch apertures from the original HB object; something like:
apertures = 
Originally I imported faces ( hb_obj.faces) and from the faces I could see their child apertures by (faces.apertures) but I couldn’t call on the child’s properties. Weird because “faces.apertures” returns a tuple but if I tried to access the tuple by index it behaved as if it was empty.
Anyway, for my solution I ended extracting faces and apertures directly from the honeybee object. Once I had both lists I could access either faces or apertures properties like so:
That’s the right idea @Mauricio . I originally didn’t add a component for this purpose because, like you showed, it only takes a line or two of Python in a GHPython component to access whatever attribute you want (including attributes that aren’t exposed on any of the components like infiltration coefficeints, for example. So here’s how you get the construction object for your case @edpmay
I also figured, when you’re building a Model like in the screenshot @edpmay posted, you have access to the construction object by virtue of the construction creation components. However, I can see that people are making heavy use of writing models to HBJSON files and reloading them in other definitions in which case you wouldn’t have the original object. If both of you think it would be useful, I can add two components that return the objects assigned to faces/apertures and rooms. It will basically do what the GHPython component in the screenshot above does but it will be able to accept the dropdown.
FYI @Mauricio , You get an empty tuple for faces.apertures when a Face has no apertures assigned to it. So that’s what’s probably happening in your case.
Right on the money Chris, I was getting an error trying to access empty tuples, lazy coding on my side. As soon as I sifted inputs by “face.has_sub_faces”, I was able to access aperture properties by calling
So, never mind getting apertures directly from the original HB object, I find it better to get faces and from these get “faces.apertures” and from there you can access all properties.
Having the documentation for LBT is such a life changer.
Thanks so much for the pointer. That makes sense now. I had assumed that the ‘new’ construction was automatically added to the library. That makes sense to just pass the actual construction object to the ‘HB Deconstruct Construction’ instead of the text-name though. That works great.
The one other part that I am still having trouble with is the ‘Apply Construction Set’ (the reason I was trying to access these constructions in the first place was that I was having some funny effects with trying to do that…)
If I try and apply a new construction using the ‘Apply Construction Set’ it doesn’t seem to work for me? Can you spot where I’m going wrong there?