Skip to content

Internalising BHoMObjects

Peter Nugent edited this page Oct 15, 2019 · 1 revision

Internalising Objects in Grasshopper

Internalising data in a script is a good way to share information internally or externally without sharing entire scripts.

Grasshopper Data Containers

Grasshopper uses containers to store data - for example there are containers for geometry, booleans, colours, integers and many more. Grasshopper Containers

BHoM Goo

The BHoM has it's own set of containers known as Goos. Currently there are the following Goos: BHoMGoos

BHoMObjectGoo
IObjectGoo
IGeometryGoo

Internalising Objects

When objects are pulled, they must be plugged in to a BHoMObjectGoo and internalised. If they are not, and the DataContainer is internalised, the objects will be unknown to Grasshopper and result in a useless object wrapper containing no useful information: Data Container Interalised

Using a BHoMObjectGoo to internalise the objects means they can be shared: BHoMObjectGoo Internalised

Note: The script must be closed and reopened to see the failed serialisation of the objects internalised in a Grasshopper DataContainer.