Reading materials and constructions JSon without restarting Rhino

Hello,
Can the material and construction Json files be read from the user folder without repeatedly restarting Rhino?
I constantly create materials and constructions from Excel files, and it would be ideal if the materials were updated continuously without having to restart to create the constructions.

Hi @fadysherif ,

I don’t know of a way to do that by default (assuming you mean so that your materials show up in the standard ‘HB Search Materials’ component?) since the material set is created when GH starts up, I believe.

There are plenty of ways to load data from outside files though - and so if you are working in excel already you might be able to just pull that data in directly and build up your materials and constructions directly? We’ve had great luck using both local CSV files for that, but nowadays mostly use a cloud database (in our case AirTable) to store all our material and construction info, which is then pulled into the GH file and used to create mats and constructions without any need to reload.

You can see a rough example of what I mean here, if it is of any interest:

but note that this doesn’t add the mats to the ‘Search’ set - so I’m not sure if that would still be helpful in your case, depending on what you are doing.

best,
@edpmay

Hi @edpmay,
Thank you for your response.
The post you have added is very helpful. I have reached something similar to point 1b in your post.
However, this requires having the materials always connected to the constructions rather than creating both externally in Excel, for example, and loading them instantly while working.
I am unsure what the technicality is behind restarting Rhino to use the HB call/search for material or construction in the user folder. It was automatically created and loaded back on the Legacy version.

Thanks again.

…this requires having the materials always connected to the constructions rather than creating both externally in Excel, …

That is true, which is one of the reasons we ended up moving towards a relational database for this task: so that all changes to materials and constructions are always ‘up to date’ with one another.

I am unsure what the technicality is behind restarting Rhino to use the HB call/search for material or construction in the user folder

The short explanation is that all the materials and constructions are imported only once, the first time that the Honeybee-Energy modules are imported into the Grasshopper (the first time you add a Honeybee component to the scene). Just because of the way module imports work in python, the components will only run this import process once, unless explicitly ‘reloaded’. While this type of module reload is technically possible, it can sometimes lead to some funny side-effects that cause other problems in the scene, and so is not often recommended in production environments (as opposed to ‘development’ use).

You could certainly create your own component that has a ‘trigger’ or something similar that would run this ‘reload’ though. For instance the AirTable connection shown above triggers on every GH run, so in that case it does ‘hot reload’ - so it is certainly possible to do that. But I think I would recommend doing anything like that ‘outside’ the standard Honeybee import process, so as not to inadvertently affect anything else that it is doing behind the scenes.

@edpmay