Importing NREL BSDF materials through HB+ error: "Failed to find AngleBasisName in first 100 lines"

Hi all,

I have been messing around with Honeybee+ for a few weeks now (congrats to whoever contributed to the Ladybug Tools!), and I have been facing an issue regarding the import of the NREL BSDF materials.

These sample files are available on Honeybee’s Github and on the Building Component Library. Both sources are identical and not a single clear glazing BSDF files works correctly (did not try for diffuse glazing). Here is a picture of the error easily reproducible:

Note that I tried importing the exact same file using the Honeybee Legacy component and it seems to happen just fine (I did not try to go further than this).

On the other side, I have been able to use BSDF files from other sources (see here for example: Simulate light diffusing materials). Unfortunately I am not familiar with Python so I did not try to find the issue on my own, which is why I am asking for help here.

Thanks in advance,
Cedric

Hi @CedricT, Thank you for reporting this. There was a 100 lines maximum line count to find AngleBasisName in xml files. Turns out all NREL xml files include geometry data and so AngleBasisName is somewhere down in there:

This change should fix it: