HB look up results for a set of rooms

hi @chris

When working with large thermal models with a lot of zones, would you know the best way to fetch the results only for a specific set of zones?

I was trying to add a crafty 3rd input into the “HB Read Custom Result” but didn’t manage to get it to work.
Either the input is the exact name of the zones of interest (out of the item selector) or we could input some keywords to search the zones that correspond.

best,
O

Hey @OlivierDambron ,

Sorry for the late response. We have a whole module in the core libraries that is just devoted to matching the imported data collections to specific rooms. You can use that match_rooms_to_data method to filter the data collections of rooms to get just the ones you care about.

It’s unfortunately not going to decrease the component runtime all that much since you still have to import all of the data collections for that output and then filter them but it will at least help with managing the output data collections.

If you need something that also decreases the component runtime, it’s a great deal more development work but you can do it by by using the native Python sqlite3 module and you’ll essentially be crafting your SQLite queries very specifically.

1 Like

Thank you so much @chris
Truely made easy…

1 Like

I’m also looking to filter results based on rooms - any idea why this isn’t working for me?

@SWalters
I faced the same issue at first. Right click your inputs on your python components and try the List type or tree type, one of them solves it.
If you’re still blocked, I can check later properly what I did to make it work.

1 Like

Thanks for that @OlivierDambron . Setting the input on ‘data_collections’ to List Access stopped the script error. However, I still don’t get a filtered output. I’m wondering if it has to do with the rooms being appended with a random UID in the result set?

@chris - On the input model, the rooms are simply named eg: ‘Bedrooms 11’ ; but in the sql result set, all rooms are appended with a uid suffix eg: BEDROOMS_11_C6157F4D.
Could this be why the component ‘HB Color Rooms’ also fails for me? with error: “1. Solution exception:None of the ColorRoom data collections could be matched to the input rooms”

It seems that the output can’t be directly operated by LB components.

Cause there’s an error occured:“1. Solution exception:_data must be a Data Collection. Got <type ‘tuple’>.”

The reason may supposed to be here:

Anyone have any ideas?

Hi @YZZhang,
try with this:

2 Likes

Thank you @MatteoMerli , it works!

1 Like

Note that the data_collections of the opaque components already contain the results of their sub-faces. Therefore, to avoid duplicate results for the apertures you shouldn’t connect the aperture geometries to faces. This is also valid for interior walls and interior apertures.