Site Tools


Grasshopper Volatile Data Inheritance

Grasshopper Wiki Pages
Robert McNeel & Associates

Summary: The inheritance of volatile data explained


Data inheritance

Data is stored in parameters (either in Volatile or Persistent form) and used in components. When data is not stored in the permanent record set of a parameter, it must be inherited from elsewhere. Every parameter (except output parameters) defines where it gets its data from and most parameters are not very particular. You can plug a double parameter into an integer source and it will take care of the conversion. The plug-in defines many conversion schemes but if there is no translation procedure defined, the parameter on the receiving end will generate a conversion error. For example, if you supply a Surface when a Point is needed, the Point parameter will generate an error message (accessible through the menu of the parameter in question) and turn red. If the parameter belongs to a component, this redness will propagate up the hierarchy and the component will become red too, even though it may not contain errors itself.


Connection management

Since parameters are in charge of their own data sources, you can access these settings through the parameter in question. Let's assume we have a small definition containing three components and two parameters:


At this stage, all the objects are unconnected and we need to start hooking them up. It doesn't matter in what order we do this, but let's go from left to right. If you start dragging near the little circle of a parameter (what us hip people call a grip) a connecting wire attaches to the mouse:


Once the mouse (with the Left Button still firmly pressed) hovers over a potential target parameter, the wire will attach and become solid. This is not a permanent connection until you release the mouse button:


We can do the same for the Y parameter of the PtGrid component and the A and B parameters of the Line component: Click+Drag+Release…



We can make connections both ways. But be careful, by default a new connection will erase existing connections. Since we assumed that you will most often only use single connections, you have to do something special to define multiple sources. If you press Shift while dragging connection wires, the mouse pointer will change to show additional behavior:



If the ADD cursor is active when you release the mouse button over a source parameter, that parameter is added to the source list. If you specify a source parameter which is already defined as a source, nothing will happen. You cannot inherit from the same source more than once.

By the same token, if you hold down the Control REM cursor it will become visible, and the targeted source is removed from the source list. If the target isn't referenced, nothing will happen.



You can also disconnect (but not connect) sources through the parameter menu:

labs/explicithistory/volatiledatainheritance.txt · Last modified: 2016/03/23 by sandy