What is idf_string for reader module?

Hello everyone,

I was trying to develop a component where I require the surface name from HB model created in same GH canvas.

As I was going through the API Docs, I noticed reader library that returns ep_fields. However, I couldnt use the module as I could not understand what exactly the input idf_string requires.

Can you please detail it further?

Thanks in advance


@Naga ,

I’m not sure if that docstring could be any clearer. The idf_string is any piece of text from an .idf file. It might be more helpful for you to state clearly what you are trying to do and then I can point you the methods that would help you out.

This sentence isn’t specific enough for me to understand what you’re trying to do:
“require the surface name from HB model created in same GH canvas”


Sorry for being unclear.

From the HB model/room, I wish to access the EP objects such BuildingSurface:Detailed. I expected that the reader module would be similar to EnergyPlusPython (EPPY) where we read the EP objects from the IDF and in the case of HB, the file that is being created on the backend while we connect the HB components in Gh.

This need flashed when I was trying to possess an approach to access an IDF object from HB Room to generate Variable Handle for EP Python Plugin from inside Gh canvas.

@chris I found answer to my question through source code of ObjToStr component.

Thank you

Hi @Naga ,

Glad you found a solution. The IDF representation of honeybee objects does not exist until you actually translate the object to IDF or you write out a Honeybee JSON that can be run though the honeybee-openstudio-gem to produce an OSM. Most honeybee objects will have a to.idf method (eg. room.to.idf(room) or a to_idf() method (eg. construciton.to_idf()). You can use these to see what the IDF representation of the object will become.

Also, I think I may have finally realized what “require the surface name from HB model created in same GH canvas” means. It seems like you want to hard-set the unique identifier of objects that’s used to identify them in the IDF (aka. the EnergyPlus Name) rather then using the auto-generated ones that are assigned when you create the honeybee rooms, faces, etc from the Grasshopper components. You can use the “HB Set Identifier” component to override the identifier that is assigned by the components:

Set_Identifier.gh (17.4 KB)

Thank you @chris for explaining the translation concept in a simple way.

I could get the opportunity to access the Honeybee-energy API Docs page, but couldn’t get access to Honeybee-core and other tools API pages.

In my free time, I wish to pursue them so that I can develop custom modules outside Rhino-Grasshopper using LB and HB Python modules.

@Naga ,

I am working on assembling a central page with links to all of the core library docs now. Are you saying that you can’t access the honeybee-core documentation page below? Or was it just that you could not find the page because it’s in a different repo from honeybee-energy?

I could not find the page because it’s in a different repo from honeybee-energy

1 Like