Skip to content

Custom Data #

Cyclops objects have the ability to store custom data which can be added and accessed on the canvas using the Set Custom Data and Get Property Value components. The data entries can be any object within Grasshopper.

Set Custom Data#

The Set Custom Data component is used to add custom data entries to Cyclops objects. Adding a custom data entry requires a unique name which will be used to retrieve the data, an optional description of what the data is and the actual value to add to the entry. The new custom data entry can be either a list or a single object and will replace any existing entry with the same name.

Warning

Make sure the data trees of objects and values match in order to get the desired outcome. For example, given a list of Cyclops objects and a list of values, if one value should be added to each Cyclops object it is recommended to graft both inputs.

Set custom data on Cyclops objects
Setting up the Set Custom Data component.

Get Property Value#

The Get Property Value component accesses all public properties of an object as well as any custom data entries on Cyclops objects. Just input the name of a property and the value of it will be retrieved. The output of this component will automatically be grafted since some properties might contain multiple values.

Info

The Add/Update button on the component is an easy way to generate/update a dropdown list of all available properties and custom data entries of the first object in the input. Hovering the properties in the value list menu will show both the type of the property as well as any potential description.

Access the property value of Cyclops objects
Setting up the Get Property Value component for a Cyclops object and retrieving a custom data entry.
Access the property value of any object in GH
Retrieving a property value from a native Grasshopper object.