Intro III - Honeybee Interface

This section will cover how to build a very simple Honeybee script from scratch. It will start with a breif introduction to the Honeybee Interface, continue to create a basic Honeybee definition, and finally conclude with a list of conventions used in Honeybee scripts. This section should allow you to begin independently expanding your knowledge by browsing through the library of components.

Honeybee Interface

Locating Components in Honeybee

To help you locate components, we will start by referring to them using the Grasshopper tab name, section name or number, and component name. For example HoneyBee | 04 Energy Material | Honeybee_Energy Plus Window Material would mean that you need to look in the Honeybee tab, under section 04 which is for specifying materials in energy simulations, and you would look for the name Honeybee_Energy Plus Window Material. You can also simply double-click in the canvas and type 'Energy Plus Window Material' (without the quotation marks), and select from the dynamic search list.

If you encounter a component you do not recognize, there are a couple things you can do:

  • You can hover the mouse over the icon in the middle of the component to see the name of the component.

  • If the component is outside Ladybug and Honeybee, you can also hold ctrl + alt at the same time to engage info mode. This shows the menu location of components already on the canvas. Unfortunately, for Ladybug and Honeybee, this will only point to the Python component.

  • A work-around for components within Ladybug and Honeybee is to double-click on a Ladybug or Honeybee component's icon itself, which will open the code inside. Scroll down to look for a line that starts with "ghenv.Component.SubCategory =" which will be followed with something like "07 | Energy | Schedule". This functions the same way as the address above, so in this case we know that the component is located in tab 7 on Energy, and is called Honeybee_Schedule.

  • If you prefer to see names instead of icons, you can also enter the Display tab in Grasshopper's menu bar, and toggle Display Icons on or off, as this will display the name of the component instead of the icon.

  • You can also double-click in the Grasshopper canvas and begin typing the name of a component to search through all of Grasshoppers Tabs. All Honeybee and Ladybug components start with either 'Honeybee' or 'Ladybug', so starting with one of those keywords is a way to search only within our plugins.

  • Another helpful tool is the bifocals component, which creates a label above each component so that it is possible for you to see both the icon and the name of each component. The bifocals component is available on https://www.food4rhino.com/app/bifocals

Creating a Honeybee Definition

iii.04 Double-click the panel component and paste the following URL link inside, without spaces before or after. It is also important not to press ENTER after entering text into a panel component, because Grasshopper interprets ENTER as creating a second item in the panel's list of data. For clarification on lists of data, see Step 2.20.

This data is from the US Department of Energy, collected at the airport in Van Nuys, California. Hovering over the component provides more detail on finding weather data for other locations, or you can browse for weather data files and download them from the US Department of Energy here: https://www.energyplus.net/weather, and read about the data itself here: https://energyplus.net/weather/sources.

iii.08 Then connect the data we imported before to this component. This will allow us to parse through many different types of data contained in the initial file we imported.

iii.14 All the following outputs contain hourly data. Lets take dry bulb temperature as an example.

The first seven entries contain information about the data, and the following 8760 values contain data points for each hour of the year. The convention for lists in Grasshopper is to start numbering at 0, so a list with 7 values will read values 0 through 6.

  • Value 0 is a key

  • Value 1 is the name of the location

  • Value 2 is the type of data

  • Value 3 is the units of that data

  • Value 4 is the frequency at which it was recorded

  • Values 5 and 6 represent a time span over which the data was collected. The format here is (month of the year, day of the month, hour of the day). So we can see this data was collected from January 1st on the first hour of the day between 00:00-01:00 until December 31st on the 24th hour of the day, from 23:00-00:00.

iii.20 You may have noticed that there are many inputs which are preceded by an underscore, but still left empty. Yet, the component still runs. This is because many inputs can assume a sensible default value. It would be meaningless to assume a default location for the sun's path because the geometry depends entirely upon the latitude of the location of study. However, one could assume that the default period of analysis is an entire year.

iii.21 Hover your mouse over different areas of the component to learn more about required inputs, default assumptions, formats for inputting data, and sometimes even references for research papers upon which the components calculations are based.

This brings us full circle to the explanation in ii.00 above. Usually, you have to connect a wire between two components in order to transfer data from one to another. This is not the case here. The library is made available because the Honeybee_Honeybee component runs first, and this makes it possible for it to perform many functions "in the background."

As you learn more about Honeybee, you will come to understand some of the advantages of writing the code this way. For example, it makes it easy to create a standard library of Radiance Materials that can be accessed from multiple grasshopper definitions.

This concludes the Honeybee Basics section. You should now be familiar with the following: 1. The layout of the Ladybug and Honeybee interface 2. The importance of letting Honeybee and Ladybug fly 3. Entering information in a panel component 4. Downloading climate data 5. Importing climate data 6. Examining imported data 6. The before or after convention for necessary vs optional inputs 7. Learning about components, inputs and outputs by hovering over them

Last updated