Loading Custom Construction Sets

I am trying to load custom construction sets created in Rhino and sent to the folder %AppData%\Roaming\ladybug_tools\standards\constructionsets using the Rhino command PO_SaveToUserLibrary with the function:

from honeybee_energy.lib.constructionsets import construction_set_by_identifier

I can see my custom construction sets when I open a new Rhino project but get a ValueError outside the Rhino env.

@chriswmackey

Can you give more information here, @marentette ? When you say “outside the Rhino env,” you mean that you are not using Rhino or Grasshopper? Are you getting this ValueError when using the Python packages with a standalone system Python?

Hi @chriswmackey ,

Ya I am calling outside Rhino and grasshopper using Python packages to build a Pollination app.

Hi @marentette ,

Did you update your installation of the Ladybug Tools core libraries by typing?

pip install lbt-dragonfly -U

It sounds like you have some older libraries there.

@chriswmackey yes my libraries are up to date.

Hi @marentette ,

I used the files that you sent me over PM and I don’t have any issue importing your construction sets:

Are you sure of the following:

  • Your installed version of honeybee-energy is 1.101.19 or greater.
  • You are using the correct ID to reference the construction set (it is case sensitive).
  • You have put them in the correct standards folder.

You can check the standards folder where the Python installation expects the construction sets to be by using the following:

from honeybee_energy.config import folders
print(folders.standards_data_folder)

zone5 works.

But for some reason the others dont:


i have checked the JSON file and the identifier matches what I have inputted into the construction_set_by_identifier function

Hey @marentette ,

Yea, it’s because those construction sets have constructions referencing stuff in the DOE/NREL library. And, because that library is huge, we only load it when it’s needed.

I’ll see if I can implement something that falls back on trying to load the DOE/NREL library when the import fails.

Hi @marentette ,

I started working on this but had some other things come up. I’ll push a fix be the end of Monday that ensures you can read in the ConstructionSets with that function.

Hey @marentette ,

Sorry it took me a while but I finished implementing some fixes that ensure that your new constructions that reference other materials in the standards library can be loaded correctly with the construction_set_by_identifier() method:

It will take an hour for the change to make it through our CI but, after this, you can pip install lbt-dragonfly -U and then you’ll be able to load all of your ConstructionSets:

1 Like